Messages in this thread | | | Date | Fri, 25 Feb 2011 15:20:39 -0800 | From | Greg KH <> | Subject | Re: [PATCH v2 6/5] Fix unaligned memory accesses in dmi-sysfs |
| |
On Fri, Feb 25, 2011 at 03:06:25PM -0800, Mike Waychison wrote: > DMI entries are arranged in memory back to back with no alignment > guarantees. This means that the struct dmi_header passed to callbacks > from dmi_walk() itself isn't byte aligned. This causes problems on > architectures that expect aligned data, such as IA64. > > The dmi-sysfs patchset introduced structure member accesses through > this passed in dmi_header. Fix this by memcpy()ing the structures to > temporary locations on stack when inspecting/copying them. > > Signed-off-by: Mike Waychison <mikew@google.com> > Tested-by: Tony Luck <tony.luck@intel.com> > --- > dmi-sysfs.c | 28 +++++++++++++--------------- > 1 file changed, 13 insertions(+), 15 deletions(-) > > diff --git a/drivers/firmware/dmi-sysfs.c b/drivers/firmware/dmi-sysfs.c > index a5afd80..eb26d62 100644 > --- a/drivers/firmware/dmi-sysfs.c > +++ b/drivers/firmware/dmi-sysfs.c > @@ -263,20 +263,16 @@ struct dmi_system_event_log { > u8 supported_log_type_descriptos[0]; > } __packed; > > -static const struct dmi_system_event_log *to_sel(const struct > dmi_header *dh)
This patch is corrupted. I tried to edit it by hand, but git still didn't like it.
Please resend using whatever you did for your other patches, as this way was not correct :(
thanks,
greg k-h
| |