* PATCH: drivers/staging/lirc/lirc_serial.c: use IS_ERR()
@ 2011-02-06 20:39 Mark Lord
2011-02-08 21:34 ` Mark Lord
0 siblings, 1 reply; 4+ messages in thread
From: Mark Lord @ 2011-02-06 20:39 UTC (permalink / raw)
To: Linux Kernel, Jarod Wilson, Greg Kroah-Hartman
[-- Attachment #1: Type: text/plain, Size: 725 bytes --]
The lirc_serial.c module has never worked with ordinary homebrew
serial blaster hardware, and leaks memory when this is attempted.
Fix it by replacing incorrect usage of PTR_ERR() with IS_ERR().
(patch is inline and also attached to bypass mailer issues).
Signed-off-by: Mark Lord <mlord@pobox.com>
--- linux-2.6.37/drivers/staging/lirc/lirc_serial.c 2011-01-04
19:50:19.000000000 -0500
+++ linux/drivers/staging/lirc/lirc_serial.c 2011-02-06 15:33:49.854453928 -0500
@@ -966,7 +966,7 @@
if (n % sizeof(int) || count % 2 == 0)
return -EINVAL;
wbuf = memdup_user(buf, n);
- if (PTR_ERR(wbuf))
+ if (IS_ERR(wbuf))
return PTR_ERR(wbuf);
spin_lock_irqsave(&hardware[type].lock, flags);
if (type == LIRC_IRDEO) {
[-- Attachment #2: lirc_serial_fix.patch --]
[-- Type: text/x-patch, Size: 428 bytes --]
--- linux-2.6.37/drivers/staging/lirc/lirc_serial.c.orig 2011-01-04 19:50:19.000000000 -0500
+++ linux/drivers/staging/lirc/lirc_serial.c 2011-02-06 15:33:49.854453928 -0500
@@ -966,7 +966,7 @@
if (n % sizeof(int) || count % 2 == 0)
return -EINVAL;
wbuf = memdup_user(buf, n);
- if (PTR_ERR(wbuf))
+ if (IS_ERR(wbuf))
return PTR_ERR(wbuf);
spin_lock_irqsave(&hardware[type].lock, flags);
if (type == LIRC_IRDEO) {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: drivers/staging/lirc/lirc_serial.c: use IS_ERR()
2011-02-06 20:39 PATCH: drivers/staging/lirc/lirc_serial.c: use IS_ERR() Mark Lord
@ 2011-02-08 21:34 ` Mark Lord
2011-02-09 19:52 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Mark Lord @ 2011-02-08 21:34 UTC (permalink / raw)
To: Linux Kernel, Jarod Wilson, Greg Kroah-Hartman
[-- Attachment #1: Type: text/plain, Size: 831 bytes --]
On 11-02-06 03:39 PM, Mark Lord wrote:
> The lirc_serial.c module has never worked with ordinary homebrew
> serial blaster hardware, and leaks memory when this is attempted.
>
> Fix it by replacing incorrect usage of PTR_ERR() with IS_ERR().
> (patch is inline and also attached to bypass mailer issues).
>
> Signed-off-by: Mark Lord <mlord@pobox.com>
>
> --- linux-2.6.37/drivers/staging/lirc/lirc_serial.c 2011-01-04
> 19:50:19.000000000 -0500
> +++ linux/drivers/staging/lirc/lirc_serial.c 2011-02-06 15:33:49.854453928 -0500
> @@ -966,7 +966,7 @@
> if (n % sizeof(int) || count % 2 == 0)
> return -EINVAL;
> wbuf = memdup_user(buf, n);
> - if (PTR_ERR(wbuf))
> + if (IS_ERR(wbuf))
> return PTR_ERR(wbuf);
> spin_lock_irqsave(&hardware[type].lock, flags);
> if (type == LIRC_IRDEO) {
Anyone out there?
Greg?
[-- Attachment #2: lirc_serial_fix.patch --]
[-- Type: text/x-patch, Size: 428 bytes --]
--- linux-2.6.37/drivers/staging/lirc/lirc_serial.c.orig 2011-01-04 19:50:19.000000000 -0500
+++ linux/drivers/staging/lirc/lirc_serial.c 2011-02-06 15:33:49.854453928 -0500
@@ -966,7 +966,7 @@
if (n % sizeof(int) || count % 2 == 0)
return -EINVAL;
wbuf = memdup_user(buf, n);
- if (PTR_ERR(wbuf))
+ if (IS_ERR(wbuf))
return PTR_ERR(wbuf);
spin_lock_irqsave(&hardware[type].lock, flags);
if (type == LIRC_IRDEO) {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: drivers/staging/lirc/lirc_serial.c: use IS_ERR()
2011-02-08 21:34 ` Mark Lord
@ 2011-02-09 19:52 ` Greg KH
2011-02-09 19:54 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2011-02-09 19:52 UTC (permalink / raw)
To: Mark Lord; +Cc: Linux Kernel, Jarod Wilson
On Tue, Feb 08, 2011 at 04:34:39PM -0500, Mark Lord wrote:
> On 11-02-06 03:39 PM, Mark Lord wrote:
> > The lirc_serial.c module has never worked with ordinary homebrew
> > serial blaster hardware, and leaks memory when this is attempted.
> >
> > Fix it by replacing incorrect usage of PTR_ERR() with IS_ERR().
> > (patch is inline and also attached to bypass mailer issues).
> >
> > Signed-off-by: Mark Lord <mlord@pobox.com>
> >
> > --- linux-2.6.37/drivers/staging/lirc/lirc_serial.c 2011-01-04
> > 19:50:19.000000000 -0500
> > +++ linux/drivers/staging/lirc/lirc_serial.c 2011-02-06 15:33:49.854453928 -0500
> > @@ -966,7 +966,7 @@
> > if (n % sizeof(int) || count % 2 == 0)
> > return -EINVAL;
> > wbuf = memdup_user(buf, n);
> > - if (PTR_ERR(wbuf))
> > + if (IS_ERR(wbuf))
> > return PTR_ERR(wbuf);
> > spin_lock_irqsave(&hardware[type].lock, flags);
> > if (type == LIRC_IRDEO) {
>
>
> Anyone out there?
>
> Greg?
Patience please, I just got over the flu and am now catching up on
patches. I'll go queue this up now.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: drivers/staging/lirc/lirc_serial.c: use IS_ERR()
2011-02-09 19:52 ` Greg KH
@ 2011-02-09 19:54 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2011-02-09 19:54 UTC (permalink / raw)
To: Mark Lord; +Cc: Linux Kernel, Jarod Wilson
On Wed, Feb 09, 2011 at 11:52:38AM -0800, Greg KH wrote:
> On Tue, Feb 08, 2011 at 04:34:39PM -0500, Mark Lord wrote:
> > On 11-02-06 03:39 PM, Mark Lord wrote:
> > > The lirc_serial.c module has never worked with ordinary homebrew
> > > serial blaster hardware, and leaks memory when this is attempted.
> > >
> > > Fix it by replacing incorrect usage of PTR_ERR() with IS_ERR().
> > > (patch is inline and also attached to bypass mailer issues).
> > >
> > > Signed-off-by: Mark Lord <mlord@pobox.com>
> > >
> > > --- linux-2.6.37/drivers/staging/lirc/lirc_serial.c 2011-01-04
> > > 19:50:19.000000000 -0500
> > > +++ linux/drivers/staging/lirc/lirc_serial.c 2011-02-06 15:33:49.854453928 -0500
> > > @@ -966,7 +966,7 @@
> > > if (n % sizeof(int) || count % 2 == 0)
> > > return -EINVAL;
> > > wbuf = memdup_user(buf, n);
> > > - if (PTR_ERR(wbuf))
> > > + if (IS_ERR(wbuf))
> > > return PTR_ERR(wbuf);
> > > spin_lock_irqsave(&hardware[type].lock, flags);
> > > if (type == LIRC_IRDEO) {
> >
> >
> > Anyone out there?
> >
> > Greg?
>
> Patience please, I just got over the flu and am now catching up on
> patches. I'll go queue this up now.
Actually, it's already fixed in the current tree thanks to Jarod in
commit 88914bdf8c677ebd7e797adac05e47303fd6ac77 so you shouldn't need to
worry about this anymore.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-02-09 19:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-06 20:39 PATCH: drivers/staging/lirc/lirc_serial.c: use IS_ERR() Mark Lord
2011-02-08 21:34 ` Mark Lord
2011-02-09 19:52 ` Greg KH
2011-02-09 19:54 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.