Char: mxser_new, fix recursive locking
authorJan Yenya Kasprzak <kas@fi.muni.cz>
Mon, 23 Apr 2007 21:41:02 +0000 (14:41 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 24 Apr 2007 15:23:07 +0000 (08:23 -0700)
Signed-off-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/mxser_new.c

index 9af07e4999d5f0cac406a3f2200adad82b27dcca..59e0aac19c2fc7cf5a34166b616fce4d9cc85868 100644 (file)
@@ -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)