Commit 186e8687 authored by Denis Efremov's avatar Denis Efremov Committed by David S. Miller

forcedeth: spin_unlock_irq in interrupt handler fix

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: default avatarDenis Efremov <yefremov.denis@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c073cfc8
...@@ -3775,7 +3775,7 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data) ...@@ -3775,7 +3775,7 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data)
np->link_timeout = jiffies + LINK_TIMEOUT; np->link_timeout = jiffies + LINK_TIMEOUT;
} }
if (events & NVREG_IRQ_RECOVER_ERROR) { if (events & NVREG_IRQ_RECOVER_ERROR) {
spin_lock_irq(&np->lock); spin_lock_irqsave(&np->lock, flags);
/* disable interrupts on the nic */ /* disable interrupts on the nic */
writel(NVREG_IRQ_OTHER, base + NvRegIrqMask); writel(NVREG_IRQ_OTHER, base + NvRegIrqMask);
pci_push(base); pci_push(base);
...@@ -3785,7 +3785,7 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data) ...@@ -3785,7 +3785,7 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data)
np->recover_error = 1; np->recover_error = 1;
mod_timer(&np->nic_poll, jiffies + POLL_WAIT); mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
} }
spin_unlock_irq(&np->lock); spin_unlock_irqrestore(&np->lock, flags);
break; break;
} }
if (unlikely(i > max_interrupt_work)) { if (unlikely(i > max_interrupt_work)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment