diff options
author | Andrey Panin <pazke@donpac.ru> | 2006-03-25 12:06:31 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 17:22:48 +0100 |
commit | bc83455bc8336f57cd74d6e86b0f8fcad187d179 (patch) | |
tree | fe0a425d375ee880179685b2156a8a22e9a222b0 /arch | |
parent | [PATCH] net: ne2k.c won't compile if pci_clone_list is const (diff) | |
download | linux-bc83455bc8336f57cd74d6e86b0f8fcad187d179.tar.xz linux-bc83455bc8336f57cd74d6e86b0f8fcad187d179.zip |
[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')
-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) 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) |