Skip to content

Commit

Permalink
[PATCH] fix DMI onboard device discovery
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrey Panin authored and Linus Torvalds committed Mar 25, 2006
1 parent b2fd16b commit bc83455
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/i386/kernel/dmi_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bc83455

Please sign in to comment.