[SCSI] qla2xxx: Acquire hardware lock while manipulating dsd list.
authorSaurav Kashyap <saurav.kashyap@qlogic.com>
Tue, 16 Aug 2011 18:29:25 +0000 (11:29 -0700)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 27 Aug 2011 14:19:37 +0000 (08:19 -0600)
The dsd list shouldn't be manipulated without taking the per host hardware
lock to prevent multiple callers from trampling upon one another.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla2xxx/qla_os.c

index f57c292845a536c63dbe690ad709b4f85f00576b..2caab83c4c9fd5214bfaaafe7a7239524b750ed9 100644 (file)
@@ -913,7 +913,10 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
                    "Abort command mbx success.\n");
                wait = 1;
        }
+
+       spin_lock_irqsave(&ha->hardware_lock, flags);
        qla2x00_sp_compl(ha, sp);
+       spin_unlock_irqrestore(&ha->hardware_lock, flags);
 
        /* Wait for the command to be returned. */
        if (wait) {