Thread (17 messages) 17 messages, 7 authors, 2012-10-19

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

From: Gregoire Gentil <hidden>
Date: 2012-09-03 06:16:32

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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help