* [PATCH] forcedeth: spin_unlock_irq in interrupt handler fix
@ 2012-07-20 21:54 Denis Efremov
2012-07-20 23:18 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Denis Efremov @ 2012-07-20 21:54 UTC (permalink / raw)
To: David S. Miller
Cc: Denis Efremov, David Decotigny, Eric Dumazet, Jiri Pirko,
Ian Campbell, netdev, linux-kernel
The replacement of spin_lock_irq/spin_unlock_irq pair in interrupt
handler by spin_lock_irqsave/spin_lock_irqrestore pair.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Denis Efremov <yefremov.denis@gmail.com>
---
drivers/net/ethernet/nvidia/forcedeth.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index 928913c..7e68c00 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -3776,7 +3776,7 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data)
np->link_timeout = jiffies + LINK_TIMEOUT;
}
if (events & NVREG_IRQ_RECOVER_ERROR) {
- spin_lock_irq(&np->lock);
+ spin_lock_irqsave(&np->lock, flags);
/* disable interrupts on the nic */
writel(NVREG_IRQ_OTHER, base + NvRegIrqMask);
pci_push(base);
@@ -3786,7 +3786,7 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data)
np->recover_error = 1;
mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
}
- spin_unlock_irq(&np->lock);
+ spin_unlock_irqrestore(&np->lock, flags);
break;
}
if (unlikely(i > max_interrupt_work)) {
--
1.7.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] forcedeth: spin_unlock_irq in interrupt handler fix
2012-07-20 21:54 [PATCH] forcedeth: spin_unlock_irq in interrupt handler fix Denis Efremov
@ 2012-07-20 23:18 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-07-20 23:18 UTC (permalink / raw)
To: yefremov.denis
Cc: david.decotigny, edumazet, jpirko, ian.campbell, netdev,
linux-kernel
From: Denis Efremov <yefremov.denis@gmail.com>
Date: Sat, 21 Jul 2012 01:54:34 +0400
> The replacement of spin_lock_irq/spin_unlock_irq pair in interrupt
> handler by spin_lock_irqsave/spin_lock_irqrestore pair.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Denis Efremov <yefremov.denis@gmail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-20 23:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-20 21:54 [PATCH] forcedeth: spin_unlock_irq in interrupt handler fix Denis Efremov
2012-07-20 23:18 ` David Miller
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).