lkml.org 
[lkml]   [2006]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] fix DMI onboard device discovery
From
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.

--
Andrey Panin | Linux and UNIX system administrator
pazke@donpac.ru | PGP key: wwwkeys.pgp.net

Signed-off-by: Andrey Panin <pazke@donpac.ru>

dmi_scan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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
--- linux-2.6.16.vanilla/arch/i386/kernel/dmi_scan.c 2006-03-22 21:07:32.000000000 +0300
+++ linux-2.6.16/arch/i386/kernel/dmi_scan.c 2006-03-22 21:11:32.775227680 +0300
@@ -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)[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2006-03-23 14:31    [W:0.022 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site