aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Efremov <yefremov.denis@gmail.com>2012-07-20 17:54:34 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-20 19:18:36 -0400
commit186e868786f97c8026f0a81400b451ace306b3a4 (patch)
treecc09f713912a357e20a2df6d46f3c788ac88ca6a
parentc073cfc89ff48ed5884af9e758344243caef92f7 (diff)
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: Denis Efremov <yefremov.denis@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/nvidia/forcedeth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index 8b7c5129c7e1..67edc2e15b82 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -3775,7 +3775,7 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data)
3775 np->link_timeout = jiffies + LINK_TIMEOUT; 3775 np->link_timeout = jiffies + LINK_TIMEOUT;
3776 } 3776 }
3777 if (events & NVREG_IRQ_RECOVER_ERROR) { 3777 if (events & NVREG_IRQ_RECOVER_ERROR) {
3778 spin_lock_irq(&np->lock); 3778 spin_lock_irqsave(&np->lock, flags);
3779 /* disable interrupts on the nic */ 3779 /* disable interrupts on the nic */
3780 writel(NVREG_IRQ_OTHER, base + NvRegIrqMask); 3780 writel(NVREG_IRQ_OTHER, base + NvRegIrqMask);
3781 pci_push(base); 3781 pci_push(base);
@@ -3785,7 +3785,7 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data)
3785 np->recover_error = 1; 3785 np->recover_error = 1;
3786 mod_timer(&np->nic_poll, jiffies + POLL_WAIT); 3786 mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
3787 } 3787 }
3788 spin_unlock_irq(&np->lock); 3788 spin_unlock_irqrestore(&np->lock, flags);
3789 break; 3789 break;
3790 } 3790 }
3791 if (unlikely(i > max_interrupt_work)) { 3791 if (unlikely(i > max_interrupt_work)) {