diff options
author | Quinn Tran <quinn.tran@cavium.com> | 2017-12-28 23:33:27 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-01-04 07:41:06 +0300 |
commit | 9d1aa4e14e0ba10f946dafd46679f16f93013d58 (patch) | |
tree | 3c357cb0e7c4a2945a468f07ac21796f0d3413b2 /drivers/scsi/qla2xxx/qla_target.c | |
parent | a4239945b8ad112fb914d0605c8f6c5fd3330f61 (diff) | |
download | linux-9d1aa4e14e0ba10f946dafd46679f16f93013d58.tar.xz |
scsi: qla2xxx: Add lock protection around host lookup
Host lookup via btree is currently protected by the hardware_lock.
Add hardware_lock when modifying btree to store host pointer.
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_target.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index d4ead404100c..5695fc249b73 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -7184,20 +7184,14 @@ qlt_update_vp_map(struct scsi_qla_host *vha, int cmd) void qlt_update_host_map(struct scsi_qla_host *vha, port_id_t id) { - unsigned long flags; - struct qla_hw_data *ha = vha->hw; if (!vha->d_id.b24) { - spin_lock_irqsave(&ha->vport_slock, flags); vha->d_id = id; qlt_update_vp_map(vha, SET_AL_PA); - spin_unlock_irqrestore(&ha->vport_slock, flags); } else if (vha->d_id.b24 != id.b24) { - spin_lock_irqsave(&ha->vport_slock, flags); qlt_update_vp_map(vha, RESET_AL_PA); vha->d_id = id; qlt_update_vp_map(vha, SET_AL_PA); - spin_unlock_irqrestore(&ha->vport_slock, flags); } } |