rpms/kernel/F-8 linux-2.6-usb-serial-fix-recursive-lock.patch, NONE, 1.1 kernel.spec, 1.372, 1.373
Chuck Ebbert (cebbert)
fedora-extras-commits at redhat.com
Mon Mar 10 22:28:12 UTC 2008
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20991
Modified Files:
kernel.spec
Added Files:
linux-2.6-usb-serial-fix-recursive-lock.patch
Log Message:
* Mon Mar 10 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.24.3-27
- usb-serial: fix deadlock (#431379)
linux-2.6-usb-serial-fix-recursive-lock.patch:
--- NEW FILE linux-2.6-usb-serial-fix-recursive-lock.patch ---
>From zaitcev at redhat.com Wed Mar 5 11:39:23 2008
From: Pete Zaitcev <zaitcev at redhat.com>
Date: Tue, 4 Mar 2008 23:28:42 -0800
Subject: USB: fix usb-serial generic recursive lock
To: greg at kroah.com
Cc: zaitcev at redhat.com, linux-usb at vger.kernel.org
Message-ID: <20080304232842.c783d383.zaitcev at redhat.com>
Nobody should be using the generic usb-serial for anything other than
testing. Still, it's not a good thing that it's easy to lock up. There
is a traceback from NMI oopser here:
https://bugzilla.redhat.com/show_bug.cgi?id=431379
But in short, if a line discipline has a chance to echo anything, input
can loop back a write method. So, don't call tty_flip_buffer_push from
under a lock taken on write path.
Signed-off-by: Pete Zaitcev <zaitcev at redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
---
drivers/usb/serial/generic.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -323,7 +323,7 @@ static void flush_and_resubmit_read_urb
room = tty_buffer_request_room(tty, urb->actual_length);
if (room) {
tty_insert_flip_string(tty, urb->transfer_buffer, room);
- tty_flip_buffer_push(tty); /* is this allowed from an URB callback ? */
+ tty_flip_buffer_push(tty);
}
}
@@ -349,10 +349,12 @@ void usb_serial_generic_read_bulk_callba
/* Throttle the device if requested by tty */
spin_lock_irqsave(&port->lock, flags);
- if (!(port->throttled = port->throttle_req))
- /* Handle data and continue reading from device */
+ if (!(port->throttled = port->throttle_req)) {
+ spin_unlock_irqrestore(&port->lock, flags);
flush_and_resubmit_read_urb(port);
- spin_unlock_irqrestore(&port->lock, flags);
+ } else {
+ spin_unlock_irqrestore(&port->lock, flags);
+ }
}
EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback);
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.372
retrieving revision 1.373
diff -u -r1.372 -r1.373
--- kernel.spec 10 Mar 2008 21:43:49 -0000 1.372
+++ kernel.spec 10 Mar 2008 22:27:36 -0000 1.373
@@ -684,6 +684,7 @@
Patch1103: linux-2.6-i386-vdso-install-unstripped-copies-on-disk.patch
Patch1308: linux-2.6-usb-ehci-hcd-respect-nousb.patch
+Patch1309: linux-2.6-usb-serial-fix-recursive-lock.patch
Patch1320: linux-2.6-isdn-hisax-fix-request_irq-oops.patch
Patch1400: linux-2.6-smarter-relatime.patch
@@ -1266,10 +1267,10 @@
# ACPI
# USB
-# Do USB suspend only on certain classes of device.
-# initialize strange modem/storage device properly (from F7 kernel)
# some usb disks spin down automatically and need allow_restart
ApplyPatch linux-2.6-usb-ehci-hcd-respect-nousb.patch
+# usb-serial can deadlock (#431379)
+ApplyPatch linux-2.6-usb-serial-fix-recursive-lock.patch
# ISDN
# fix request_irq oops
@@ -1909,6 +1910,9 @@
%changelog
+* Mon Mar 10 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.24.3-27
+- usb-serial: fix deadlock (#431379)
+
* Mon Mar 10 2008 John W. Linville <linville at redhat.com> 2.6.24.3-26
- iwlwifi: Moving EEPROM handling in iwlcore module
- ath5k: struct ath5k_desc cleanups
More information about the fedora-extras-commits
mailing list