* [patch] mxser: spin_lock() => spin_lock_irq()
@ 2010-04-01 15:51 Dan Carpenter
2010-04-01 16:52 ` Jiri Slaby
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-04-01 15:51 UTC (permalink / raw)
To: Jiri Slaby
Cc: Alan Cox, Greg Kroah-Hartman, Andrew Morton, Alexey Dobriyan,
linux-kernel, kernel-janitors
This should be spin_lock_irq() to match the spin_unlock_irq().
Originally it was a lock_kernel() but we switched everything to
spin_lock_irq() last November.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index e0c5d2a..ecb2d8b 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -1768,7 +1768,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
int len, lsr;
len = mxser_chars_in_buffer(tty);
- spin_lock(&info->slock);
+ spin_lock_irq(&info->slock);
lsr = inb(info->ioaddr + UART_LSR) & UART_LSR_THRE;
spin_unlock_irq(&info->slock);
len += (lsr ? 0 : 1);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] mxser: spin_lock() => spin_lock_irq()
2010-04-01 15:51 [patch] mxser: spin_lock() => spin_lock_irq() Dan Carpenter
@ 2010-04-01 16:52 ` Jiri Slaby
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2010-04-01 16:52 UTC (permalink / raw)
To: Dan Carpenter, Alan Cox, Greg Kroah-Hartman, Andrew Morton,
Alexey Dobriyan, linux-kernel, kernel-janitors
On 04/01/2010 05:51 PM, Dan Carpenter wrote:
> This should be spin_lock_irq() to match the spin_unlock_irq().
> Originally it was a lock_kernel() but we switched everything to
> spin_lock_irq() last November.
>
> Signed-off-by: Dan Carpenter<error27@gmail.com>
>
> diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
> index e0c5d2a..ecb2d8b 100644
> --- a/drivers/char/mxser.c
> +++ b/drivers/char/mxser.c
> @@ -1768,7 +1768,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
> int len, lsr;
>
> len = mxser_chars_in_buffer(tty);
> - spin_lock(&info->slock);
> + spin_lock_irq(&info->slock);
Hmm, and there is one more error in the MOXA_ASPP_MON case. Interrupts
are not disabled at all there. Could you fix that too?
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-01 16:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-01 15:51 [patch] mxser: spin_lock() => spin_lock_irq() Dan Carpenter
2010-04-01 16:52 ` Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).