linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: linux-kernel@vger.kernel.org, carlos@strangeworlds.co.uk,
	"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Fix oops in acer_wmi
Date: Sat, 23 Aug 2008 14:05:09 -0700	[thread overview]
Message-ID: <20080823140509.4b197021@infradead.org> (raw)

In the current kerneloops.org stats, acer_wmi is pretty high on the
list for 2.6.27-rc:
http://www.kerneloops.org/search.php?search=acer_wmi_init

this is due to a null pointer due to a misordered initialization...
when the DMI quirks get run, the "interface" variable might not have been initialized.
The patch below 1) prevents the oops and 2) runs the quirks again after all the "interface"
initialization has completed.

This oops is new in 2.6.27-rc and thus counts as a regression...


--- linux.trees.git/drivers/misc/acer-wmi.c~	2008-08-23 13:59:22.000000000 -0700
+++ linux.trees.git/drivers/misc/acer-wmi.c	2008-08-23 14:00:32.000000000 -0700
@@ -192,6 +192,9 @@ static struct quirk_entry *quirks;
 
 static void set_quirks(void)
 {
+	if (!interface)
+		return;
+
 	if (quirks->mailled)
 		interface->capability |= ACER_CAP_MAILLED;
 
@@ -1237,6 +1240,8 @@ static int __init acer_wmi_init(void)
 		return -ENODEV;
 	}
 
+	set_quirks();
+
 	if (platform_driver_register(&acer_platform_driver)) {
 		printk(ACER_ERR "Unable to register platform driver.\n");
 		goto error_platform_register;

             reply	other threads:[~2008-08-23 21:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-23 21:05 Arjan van de Ven [this message]
2008-08-24  1:19 ` Fix oops in acer_wmi Carlos Corbacho
2008-08-24  4:45   ` Arjan van de Ven
2008-08-24  8:38     ` Carlos Corbacho

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=20080823140509.4b197021@infradead.org \
    --to=arjan@infradead.org \
    --cc=carlos@strangeworlds.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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;
as well as URLs for NNTP newsgroup(s).