[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <471C1D3C.1080801@intellect.com.au>
Date: Mon, 22 Oct 2007 11:47:08 +0800
From: Richard Pearman <richard.pearman@...ellect.com.au>
To: Greg KH <greg@...ah.com>, pberger@...mson.com,
borchers@...inerpoint.com
CC: torvalds@...l.org, linux-kernel@...r.kernel.org
Subject: [PATCH 001] USB: Error handling bug fix for serial_open()
From: Richard Pearman <richard.pearman@...ellect.com.au>
From: Greg Breen <greg.breen@...ellect.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@...ellect.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);
View attachment "richard.pearman.vcf" of type "text/x-vcard" (409 bytes)
Powered by blists - more mailing lists