linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mpx5200_uart: drop port lock across tty_flip_buffer() call
@ 2007-07-25 19:10 Thomas Gleixner
  2007-07-25 19:42 ` Grant Likely
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Gleixner @ 2007-07-25 19:10 UTC (permalink / raw)
  To: linuxppc-embedded

The port lock needs to be dropped across the tty_flip_buffer call, as it
would lead to a deadlock with the spin_lock(&port->lock) in uart_start()

Uncovered by lockdep / preempt-rt

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>


Index: linux-2.6.22/drivers/serial/mpc52xx_uart.c
===================================================================
--- linux-2.6.22.orig/drivers/serial/mpc52xx_uart.c	2007-07-09 01:32:17.000000000 +0200
+++ linux-2.6.22/drivers/serial/mpc52xx_uart.c	2007-07-25 21:06:11.000000000 +0200
@@ -501,7 +501,9 @@ mpc52xx_uart_int_rx_chars(struct uart_po
 		}
 	}
 
+	spin_unlock(&port->lock);
 	tty_flip_buffer_push(tty);
+	spin_lock(&port->lock);
 
 	return in_be16(&PSC(port)->mpc52xx_psc_status) & MPC52xx_PSC_SR_RXRDY;
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-26  9:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-25 19:10 [PATCH] mpx5200_uart: drop port lock across tty_flip_buffer() call Thomas Gleixner
2007-07-25 19:42 ` Grant Likely
2007-07-25 19:47   ` Thomas Gleixner
2007-07-25 19:54     ` Grant Likely
2007-07-26  9:25     ` Daniel Schnell
2007-07-26  9:41       ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).