]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
advansys: use spin_lock_irqsave() in interrupt handler
authorHannes Reinecke <hare@suse.de>
Fri, 24 Apr 2015 11:18:40 +0000 (13:18 +0200)
committerJames Bottomley <JBottomley@Odin.com>
Tue, 26 May 2015 06:00:13 +0000 (23:00 -0700)
We should be using spin_lock_irqsave() when within the
interrupt handler.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/advansys.c

index 15bb8d050457024ae7d962b52c56a2f5e6281bb2..5ece3178195de840edd682d3ae4fa77435770660 100644 (file)
@@ -7242,9 +7242,10 @@ static irqreturn_t advansys_interrupt(int irq, void *dev_id)
        struct Scsi_Host *shost = dev_id;
        struct asc_board *boardp = shost_priv(shost);
        irqreturn_t result = IRQ_NONE;
+       unsigned long flags;
 
        ASC_DBG(2, "boardp 0x%p\n", boardp);
-       spin_lock(shost->host_lock);
+       spin_lock_irqsave(shost->host_lock, flags);
        if (ASC_NARROW_BOARD(boardp)) {
                if (AscIsIntPending(shost->io_port)) {
                        result = IRQ_HANDLED;
@@ -7259,7 +7260,7 @@ static irqreturn_t advansys_interrupt(int irq, void *dev_id)
                        ASC_STATS(shost, interrupt);
                }
        }
-       spin_unlock(shost->host_lock);
+       spin_unlock_irqrestore(shost->host_lock, flags);
 
        ASC_DBG(1, "end\n");
        return result;