[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B320CAA.1030708@mandriva.com>
Date: Wed, 23 Dec 2009 10:27:22 -0200
From: Eugeni Dodonov <eugeni@...driva.com>
To: Greg Kroah-Hartman <gregkh@...e.de>, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: PATCH: asus_oled oops in 2.6.32.2
Hi,
After updating to 2.6.32 kernel, I started experiencing Oopses caused by
the asus_oled module. After quick investigation, I wrapped this simple
patch which fixes an Oops in by asus_oled module on 2.6.32.2 kernel,
caused by incorrect usage of strict_strtoul function call within
set_enabled and set_disabled functions. This can be triggered by simple
running the userspace client for asus_old (e.g., 'asusoled -e' or
'asusoled -d').
--- drivers/staging/asus_oled/asus_oled.c.ori 2009-12-23
08:56:09.454535290 -0200
+++ drivers/staging/asus_oled/asus_oled.c 2009-12-23 09:04:12.591283411
-0200
@@ -194,9 +194,11 @@
{
struct usb_interface *intf = to_usb_interface(dev);
struct asus_oled_dev *odev = usb_get_intfdata(intf);
- int temp = strict_strtoul(buf, 10, NULL);
+ unsigned long value;
+ if (strict_strtoul(buf, 10, &value))
+ return -EINVAL;
- enable_oled(odev, temp);
+ enable_oled(odev, value);
return count;
}
@@ -207,10 +209,12 @@
{
struct asus_oled_dev *odev =
(struct asus_oled_dev *) dev_get_drvdata(device);
+ unsigned long value;
- int temp = strict_strtoul(buf, 10, NULL);
+ if (strict_strtoul(buf, 10, &value))
+ return -EINVAL;
- enable_oled(odev, temp);
+ enable_oled(odev, value);
return count;
}
Please let me know if you need more info.
Thanks.
--
Eugeni Dodonov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists