diff options
author | Anirban Chakraborty <anirban.chakraborty@qlogic.com> | 2010-02-04 23:17:59 +0100 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-02-08 20:45:55 +0100 |
commit | a67093d46e3caed1a42d694a7de452b61db30562 (patch) | |
tree | 092ef591331f99807fee2fb67bdc7efc2dfb2cc7 /drivers/scsi/qla2xxx/qla_mid.c | |
parent | [SCSI] compat_ioct: fix bsg SG_IO (diff) | |
download | linux-a67093d46e3caed1a42d694a7de452b61db30562.tar.xz linux-a67093d46e3caed1a42d694a7de452b61db30562.zip |
[SCSI] qla2xxx: Obtain proper host structure during response-queue processing.
Original code incorrectly assumed only status-type-0
IOCBs would be queued to the response-queue, and thus all
entries would safely reference a VHA from the IOCB
'handle.'
Cc: stable@kernel.org
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mid.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mid.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index b901aa267e7d..ff17dee28613 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c @@ -636,13 +636,15 @@ failed: static void qla_do_work(struct work_struct *work) { + unsigned long flags; struct rsp_que *rsp = container_of(work, struct rsp_que, q_work); struct scsi_qla_host *vha; + struct qla_hw_data *ha = rsp->hw; - spin_lock_irq(&rsp->hw->hardware_lock); - vha = qla25xx_get_host(rsp); + spin_lock_irqsave(&rsp->hw->hardware_lock, flags); + vha = pci_get_drvdata(ha->pdev); qla24xx_process_response_queue(vha, rsp); - spin_unlock_irq(&rsp->hw->hardware_lock); + spin_unlock_irqrestore(&rsp->hw->hardware_lock, flags); } /* create response queue */ |