public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nozomi: Prepare for BKL pushdown
@ 2008-02-20 20:21 Alan Cox
  0 siblings, 0 replies; only message in thread
From: Alan Cox @ 2008-02-20 20:21 UTC (permalink / raw)
  To: akpm, linux-kernel

We leave the BKL around the rts/dtr handler because there is *no* locking
of any kind on this in the driver. It's not "right" with this change but
it's the same wrong as before..

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.25-rc2-mm1/drivers/char/nozomi.c linux-2.6.25-rc2-mm1/drivers/char/nozomi.c
--- linux.vanilla-2.6.25-rc2-mm1/drivers/char/nozomi.c	2008-02-19 11:03:00.000000000 +0000
+++ linux-2.6.25-rc2-mm1/drivers/char/nozomi.c	2008-02-20 11:45:57.000000000 +0000
@@ -1716,6 +1716,7 @@
 static int ntty_tiocmset(struct tty_struct *tty, struct file *file,
 	unsigned int set, unsigned int clear)
 {
+	lock_kernel();		/* FIXME: Add internal locking */
 	if (set & TIOCM_RTS)
 		set_rts(tty, 1);
 	else if (clear & TIOCM_RTS)
@@ -1725,7 +1726,7 @@
 		set_dtr(tty, 1);
 	else if (clear & TIOCM_DTR)
 		set_dtr(tty, 0);
-
+	unlock_kernel();
 	return 0;
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-20 20:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-20 20:21 [PATCH] nozomi: Prepare for BKL pushdown Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox