Skip to contentSkip to conversation

fix DMI onboard device discovery

PATCH New Andrey Panin 1 participant 1 message Mar 23, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix DMI onboard device discovery

Hello,

attached patch fixes invalid pointer arithmetic in DMI code to make onboard device discovery working again. Tested and works.

Please consider applying.

Best regards.

Signature · 2 lines
Andrey Panin		| Linux and UNIX system administrator
[email protected]		| PGP key: wwwkeys.pgp.net
 dmi_scan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/i386/kernel/dmi_scan.c +1 -1
diff -urdpNX /usr/share/dontdiff linux-2.6.16.vanilla/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) + sizeof(struct dmi_header) + (i * 2);
 
 		/* Skip disabled device */
 		if ((*d & 0x80) == 0)