lkml.org 
[lkml]   [2003]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] matroxfb_maven module OOPS on insmod
Hi,

When running the following commands:

/sbin/modprobe i2c-algo-bit
/sbin/modprobe i2c-matroxfb
/sbin/modprobe matroxfb_maven

the 2.6.0 kernel will reliably oops. The problem is a result of calling
device_add with uninitialized data. The following patch allows the module
to be inserted.

-Kevin

--
---------------------------------------------------------------------
| Kevin O'Connor "BTW, IMHO we need a FAQ for |
| kevin@koconnor.net 'IMHO', 'FAQ', 'BTW', etc. !" |
---------------------------------------------------------------------
--- gold-2.6/drivers/video/matrox/matroxfb_maven.c 2003-10-25 14:42:44.000000000 -0400
+++ linux-2.6.0/drivers/video/matrox/matroxfb_maven.c 2003-12-22 21:55:04.082725504 -0500
@@ -1249,6 +1249,7 @@
err = -ENOMEM;
goto ERROR0;
}
+ memset(new_client, 0, sizeof(*new_client) + sizeof(*data));
data = (struct maven_data*)(new_client + 1);
i2c_set_clientdata(new_client, data);
new_client->addr = address;
\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.019 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site