lkml.org 
[lkml]   [2003]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drivers/char/riscom8.c: cli/sti removal
Felipe W Damasio <felipewd@terra.com.br> :
[cli+restore/spinlock conversioni for riscom8]
> --- linux-2.6.0-test2/drivers/char/riscom8.c.orig Wed Jul 30 14:39:11 2003
> +++ linux-2.6.0-test2/drivers/char/riscom8.c Wed Jul 30 14:42:44 2003
[...]
> @@ -1084,7 +1090,7 @@
> if (!port || rc_paranoia_check(port, tty->name, "close"))
> return;
>
> - save_flags(flags); cli();
> + spin_lock_irqsave(&rc_lock, flags);
> if (tty_hung_up_p(filp))
> goto out;
>

1111 tty->closing = 1;
1112 if (port->closing_wait != ASYNC_CLOSING_WAIT_NONE)
1113 tty_wait_until_sent(tty, port->closing_wait);
^^^^^^^^^^^^^^^^^^^ -> may sleep
[...]
1132 while(port->IER & IER_TXEMPTY) {
1133 current->state = TASK_INTERRUPTIBLE;
1134 schedule_timeout(port->timeout);
^^^^^^^^^^^^^^^^ -> <blink>BOOM</blink>

If you haven't read Documentation/DocBook/kernel-locking.tmpl, please give
it a try. If you have, well, double-check your code.

Regards

--
Ueimor
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.047 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site