From: Jan Yenya Kasprzak Date: Mon, 23 Apr 2007 21:41:02 +0000 (-0700) Subject: Char: mxser_new, fix recursive locking X-Git-Tag: v2.6.21~29 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67d2bc58afdd5168dce54ae06f5f30038c59f498;p=linux-2.6 Char: mxser_new, fix recursive locking Signed-off-by: Jan "Yenya" Kasprzak Acked-by: Jiri Slaby Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c index 9af07e4999..59e0aac19c 100644 --- a/drivers/char/mxser_new.c +++ b/drivers/char/mxser_new.c @@ -2230,7 +2230,14 @@ end_intr: port->mon_data.rxcnt += cnt; port->mon_data.up_rxcnt += cnt; + /* + * We are called from an interrupt context with &port->slock + * being held. Drop it temporarily in order to prevent + * recursive locking. + */ + spin_unlock(&port->slock); tty_flip_buffer_push(tty); + spin_lock(&port->slock); } static void mxser_transmit_chars(struct mxser_port *port)