"g_serial: fix deadlock with PREEMPT_RT enabled" still not integrated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I think that the g_serial patch is still not integrated and it's still needed at least as I experienced it on 3.4-rt17 on ARM:
http://www.spinics.net/lists/linux-rt-users/msg07158.html

Here is an update of the patch:

--- a/drivers/usb/gadget/u_serial.c	2012-08-29 12:17:48.607922510 -0700
+++ b/drivers/usb/gadget/u_serial.c	2012-08-29 12:23:21.305572267 -0700
@@ -554,7 +554,15 @@
 	 * a workqueue, so we won't get callbacks and can hold port_lock
 	 */
 	if (tty && do_push)
-		tty_flip_buffer_push(tty);
+		/*
+		* Drop the lock here since it might end up calling
+		* gs_flush_chars, which takes the lock.
+		*/
+		spin_unlock_irq(&port->port_lock);
+ 		tty_flip_buffer_push(tty);
+		spin_lock_irq(&port->port_lock);
+		/* tty may have been closed */
+		tty = port->port_tty;


 	/* We want our data queue to become empty ASAP, keeping data


Grégoire

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux