diff options
author | Andrey Panin <pazke@donpac.ru> | 2006-03-25 03:06:31 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 08:22:48 -0800 |
commit | bc83455bc8336f57cd74d6e86b0f8fcad187d179 (patch) | |
tree | fe0a425d375ee880179685b2156a8a22e9a222b0 | |
parent | b2fd16b4ff2508ac16ae994f4bcd941f97754c00 (diff) | |
download | kernel_samsung_tuna-bc83455bc8336f57cd74d6e86b0f8fcad187d179.zip kernel_samsung_tuna-bc83455bc8336f57cd74d6e86b0f8fcad187d179.tar.gz kernel_samsung_tuna-bc83455bc8336f57cd74d6e86b0f8fcad187d179.tar.bz2 |
[PATCH] fix DMI onboard device discovery
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 <pazke@donpac.ru>
Cc: Corey Minyard <minyard@acm.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/i386/kernel/dmi_scan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c index 6a93d75..ca2a0cb 100644 --- a/arch/i386/kernel/dmi_scan.c +++ b/arch/i386/kernel/dmi_scan.c @@ -106,7 +106,7 @@ static void __init dmi_save_devices(struct dmi_header *dm) 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) |