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 <[email protected]>
> Tested-by: Tony Luck <[email protected]>
> ---
>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to