From: Thomas Gleixner <tglx@linutronix.de>
To: linuxppc-embedded@ozlabs.org
Subject: [PATCH] mpx5200_uart: drop port lock across tty_flip_buffer() call
Date: Wed, 25 Jul 2007 21:10:56 +0200 [thread overview]
Message-ID: <1185390656.3227.12.camel@chaos> (raw)
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;
}
next reply other threads:[~2007-07-25 19:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-25 19:10 Thomas Gleixner [this message]
2007-07-25 19:42 ` [PATCH] mpx5200_uart: drop port lock across tty_flip_buffer() call 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1185390656.3227.12.camel@chaos \
--to=tglx@linutronix.de \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.