From: Greg Kroah-Hartman Date: Thu, 15 Oct 2009 15:24:13 +0000 (-0700) Subject: start .27 queue X-Git-Tag: v2.6.27.38~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f32d945efcfaba88fa81217b60e464249a329a87;p=thirdparty%2Fkernel%2Fstable-queue.git start .27 queue --- diff --git a/queue-2.6.27/series b/queue-2.6.27/series new file mode 100644 index 00000000000..8cab8179853 --- /dev/null +++ b/queue-2.6.27/series @@ -0,0 +1 @@ +usb-serial-fix-crash-when-sub-driver-updates-firmware.patch diff --git a/queue-2.6.27/usb-serial-fix-crash-when-sub-driver-updates-firmware.patch b/queue-2.6.27/usb-serial-fix-crash-when-sub-driver-updates-firmware.patch new file mode 100644 index 00000000000..4c610f6f306 --- /dev/null +++ b/queue-2.6.27/usb-serial-fix-crash-when-sub-driver-updates-firmware.patch @@ -0,0 +1,42 @@ +From 0a3c8549ea7e94d74a41096d42bc6cdf43d183bf Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Wed, 27 May 2009 11:25:52 -0400 +Subject: usb-serial: fix crash when sub-driver updates firmware + +From: Alan Stern + +commit 0a3c8549ea7e94d74a41096d42bc6cdf43d183bf upstream. + +This patch (as1244) fixes a crash in usb-serial that occurs when a +sub-driver returns a positive value from its attach method, indicating +that new firmware was loaded and the device will disconnect and +reconnect. The usb-serial core then skips the step of registering the +port devices; when the disconnect occurs, the attempt to unregister +the ports fails dramatically. + +This problem shows up with Keyspan devices and it might affect others +as well. + +When the attach method returns a positive value, the patch sets +num_ports to 0. This tells usb_serial_disconnect() not to try +unregistering any of the ports; instead they are cleaned up by +destroy_serial(). + +Signed-off-by: Alan Stern +Tested-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/usb-serial.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/usb-serial.c ++++ b/drivers/usb/serial/usb-serial.c +@@ -973,6 +973,7 @@ int usb_serial_probe(struct usb_interfac + if (retval > 0) { + /* quietly accept this device, but don't bind to a + serial port as it's about to disappear */ ++ serial->num_ports = 0; + goto exit; + } + }