diff options
author | Andrey Panin <pazke@donpac.ru> | 2006-03-25 06:06:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 11:22:48 -0500 |
commit | bc83455bc8336f57cd74d6e86b0f8fcad187d179 (patch) | |
tree | fe0a425d375ee880179685b2156a8a22e9a222b0 /arch/i386 | |
parent | b2fd16b4ff2508ac16ae994f4bcd941f97754c00 (diff) |
[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>
Diffstat (limited to 'arch/i386')
-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 6a93d75db431..ca2a0cbcac04 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) | |||
106 | struct dmi_device *dev; | 106 | struct dmi_device *dev; |
107 | 107 | ||
108 | for (i = 0; i < count; i++) { | 108 | for (i = 0; i < count; i++) { |
109 | char *d = ((char *) dm) + (i * 2); | 109 | char *d = (char *)(dm + 1) + (i * 2); |
110 | 110 | ||
111 | /* Skip disabled device */ | 111 | /* Skip disabled device */ |
112 | if ((*d & 0x80) == 0) | 112 | if ((*d & 0x80) == 0) |