public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PATCH: asus_oled oops in 2.6.32.2
@ 2009-12-23 12:27 Eugeni Dodonov
  2009-12-23 17:49 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Eugeni Dodonov @ 2009-12-23 12:27 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: asus_oled oops in 2.6.32.2
  2009-12-23 12:27 PATCH: asus_oled oops in 2.6.32.2 Eugeni Dodonov
@ 2009-12-23 17:49 ` Greg KH
  2009-12-23 20:02   ` Eugeni Dodonov
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2009-12-23 17:49 UTC (permalink / raw)
  To: Eugeni Dodonov; +Cc: Greg Kroah-Hartman, devel, linux-kernel

On Wed, Dec 23, 2009 at 10:27:22AM -0200, Eugeni Dodonov wrote:
> 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').

Looks good, can I get a 'Signed-off-by:' line so that I can apply the
patch?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: asus_oled oops in 2.6.32.2
  2009-12-23 17:49 ` Greg KH
@ 2009-12-23 20:02   ` Eugeni Dodonov
  2010-01-15 18:06     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Eugeni Dodonov @ 2009-12-23 20:02 UTC (permalink / raw)
  To: Greg KH; +Cc: Greg Kroah-Hartman, devel, linux-kernel

On 12/23/2009 03:49 PM, Greg KH wrote:
> On Wed, Dec 23, 2009 at 10:27:22AM -0200, Eugeni Dodonov wrote:
>> 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').
> 
> Looks good, can I get a 'Signed-off-by:' line so that I can apply the
> patch?

Sure:
Signed-off-by: Eugeni Dodonov <eugeni@mandriva.com>

Thanks,
Eugeni

-- 
Eugeni Dodonov

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: asus_oled oops in 2.6.32.2
  2009-12-23 20:02   ` Eugeni Dodonov
@ 2010-01-15 18:06     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2010-01-15 18:06 UTC (permalink / raw)
  To: Eugeni Dodonov; +Cc: Greg Kroah-Hartman, devel, linux-kernel

On Wed, Dec 23, 2009 at 06:02:07PM -0200, Eugeni Dodonov wrote:
> On 12/23/2009 03:49 PM, Greg KH wrote:
> > On Wed, Dec 23, 2009 at 10:27:22AM -0200, Eugeni Dodonov wrote:
> >> 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').
> > 
> > Looks good, can I get a 'Signed-off-by:' line so that I can apply the
> > patch?
> 
> Sure:
> Signed-off-by: Eugeni Dodonov <eugeni@mandriva.com>

Thanks, I've updated the patch and will send it to Linus later today.

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-15 18:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-23 12:27 PATCH: asus_oled oops in 2.6.32.2 Eugeni Dodonov
2009-12-23 17:49 ` Greg KH
2009-12-23 20:02   ` Eugeni Dodonov
2010-01-15 18:06     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox