Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Kevin O'Connor <kevin@koconnor.net>
To: vandrove@vc.cvut.cz, linux-fbdev-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: [PATCH] matroxfb_maven module OOPS on insmod
Date: Mon, 22 Dec 2003 22:09:59 -0500	[thread overview]
Message-ID: <20031223030959.GA3038@arizona.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 591 bytes --]

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. !"    |
 ---------------------------------------------------------------------

[-- Attachment #2: matrox_diff --]
[-- Type: text/plain, Size: 416 bytes --]

--- 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;

                 reply	other threads:[~2003-12-23  3:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031223030959.GA3038@arizona.localdomain \
    --to=kevin@koconnor.net \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vandrove@vc.cvut.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox