From: Mike Waychison Date: Fri, 25 Feb 2011 23:41:49 +0000 (-0800) Subject: firmware: Fix unaligned memory accesses in dmi-sysfs X-Git-Tag: v2.6.39-rc1~471^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66245ad025e02fe9e727c03d43308bb24e346bb6;p=pandora-kernel.git firmware: Fix unaligned memory accesses in dmi-sysfs 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 Tested-by: Tony Luck Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed