From: Greg Kroah-Hartman Date: Sat, 25 Mar 2006 03:19:44 +0000 (-0800) Subject: add dmi patch to 2.6.16 queue X-Git-Tag: v2.6.16.1~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=034c7105f62b68044ce438c5b0e4ad19ac36695f;p=thirdparty%2Fkernel%2Fstable-queue.git add dmi patch to 2.6.16 queue --- diff --git a/queue-2.6.16/dmi-fix-dmi-onboard-device-discovery.patch b/queue-2.6.16/dmi-fix-dmi-onboard-device-discovery.patch new file mode 100644 index 00000000000..6242a5d8095 --- /dev/null +++ b/queue-2.6.16/dmi-fix-dmi-onboard-device-discovery.patch @@ -0,0 +1,38 @@ +From stable-bounces@linux.kernel.org Fri Mar 24 13:17:43 2006 +Message-Id: <200603242116.k2OLGU1I029591@shell0.pdx.osdl.net> +To: pazke@donpac.ru, minyard@acm.org, stable@kernel.org, mm-commits@vger.kernel.org +From: Andrey Panin +Date: Fri, 24 Mar 2006 13:18:52 -0800 +Cc: +Subject: DMI: fix DMI onboard device discovery + +From: Andrey Panin + +Attached patch fixes invalid pointer arithmetic in DMI code to make onboard +device discovery working again. + +akpm: bug has been present since dmi_find_device() was added in 2.6.14. +Affects ipmi only (I think) - the symptoms weren't described. + +akpm: changed to use pointer arithmetic rather than open-coded sizeof. + +Signed-off-by: Andrey Panin +Cc: Corey Minyard +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + + arch/i386/kernel/dmi_scan.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- linux-2.6.16.orig/arch/i386/kernel/dmi_scan.c ++++ linux-2.6.16/arch/i386/kernel/dmi_scan.c +@@ -106,7 +106,7 @@ static void __init dmi_save_devices(stru + struct dmi_device *dev; + + for (i = 0; i < count; i++) { +- char *d = ((char *) dm) + (i * 2); ++ char *d = (char *)(dm + 1) + (i * 2); + + /* Skip disabled device */ + if ((*d & 0x80) == 0) diff --git a/queue-2.6.16/series b/queue-2.6.16/series index 49ec7dd5c41..846b86d297b 100644 --- a/queue-2.6.16/series +++ b/queue-2.6.16/series @@ -17,3 +17,4 @@ proc-fix-duplicate-line-in-proc-devices.patch fix-scheduler-deadlock.patch dm-fix-bug-bio_rw_barrier-requests-to-md-raid1-hang.patch cciss-fix-use-after-free-in-cciss_init_one.patch +dmi-fix-dmi-onboard-device-discovery.patch