public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 001] USB: Error handling bug fix for serial_open()
       [not found] ` <20071008220821.GA31234@kroah.com>
@ 2007-10-22  3:47   ` Richard Pearman
  2007-10-24 21:27     ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Pearman @ 2007-10-22  3:47 UTC (permalink / raw)
  To: Greg KH, pberger, borchers; +Cc: torvalds, linux-kernel

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

From: Richard Pearman <richard.pearman@intellect.com.au>
From: Greg Breen <greg.breen@intellect.com.au>

When an error occurs in serial_open() ensure that port->tty and 
tty->driver_data are set  to NULL, if previously assigned a value in the 
function.

Signed-off-by: Richard S. Pearman <richard.pearman@intellect.com.au>
---
--- linux-2.6.17.1/drivers/usb/serial/usb-serial.c.orig    Mon Oct 22 
11:12:29 2007
+++ linux-2.6.17.1/drivers/usb/serial/usb-serial.c    Mon Oct 22 
11:12:23 2007
@@ -230,6 +230,8 @@ bailout_module_put:
     module_put(serial->type->driver.owner);
 bailout_mutex_unlock:
     port->open_count = 0;
+    port->tty = NULL;
+    tty->driver_data = NULL;   
     mutex_unlock(&port->mutex);
 bailout_kref_put:
     kref_put(&serial->kref, destroy_serial);

[-- Attachment #2: richard.pearman.vcf --]
[-- Type: text/x-vcard, Size: 408 bytes --]

begin:vcard
fn:Richard Pearman
n:Pearman;Richard
org:Intellect Australia;Embedded Systems Team
adr:EIR Building, Technology Park, Bentley;;Suite 11 and 12, 1 Sarich Way;Perth;WA;6102;Australia
email;internet:richard.pearman@intellect.com.au
title:Senior embedded systems  engineer
tel;work:+61 (08) 9472 2271
tel;fax:+61 (08) 9470 2584
x-mozilla-html:FALSE
url:http://www.intellect.be
version:2.1
end:vcard


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

* Re: [PATCH 001] USB: Error handling bug fix for serial_open()
  2007-10-22  3:47   ` [PATCH 001] USB: Error handling bug fix for serial_open() Richard Pearman
@ 2007-10-24 21:27     ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2007-10-24 21:27 UTC (permalink / raw)
  To: Richard Pearman; +Cc: pberger, borchers, torvalds, linux-kernel

On Mon, Oct 22, 2007 at 11:47:08AM +0800, Richard Pearman wrote:
> From: Richard Pearman <richard.pearman@intellect.com.au>
> From: Greg Breen <greg.breen@intellect.com.au>
>
> When an error occurs in serial_open() ensure that port->tty and 
> tty->driver_data are set  to NULL, if previously assigned a value in the 
> function.
>
> Signed-off-by: Richard S. Pearman <richard.pearman@intellect.com.au>
> ---
> --- linux-2.6.17.1/drivers/usb/serial/usb-serial.c.orig    Mon Oct 22 

This has already been fixed in newer kernel versions.

Thanks for the patch though.

greg k-h

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

end of thread, other threads:[~2007-10-24 22:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4709B59F.3020307@intellect.com.au>
     [not found] ` <20071008220821.GA31234@kroah.com>
2007-10-22  3:47   ` [PATCH 001] USB: Error handling bug fix for serial_open() Richard Pearman
2007-10-24 21:27     ` Greg KH

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