Skip to content

Commit

Permalink
[SCSI] qla2xxx: locking problem in qla2x00_init_rings()
Browse files Browse the repository at this point in the history
IRQs are already disabled here so we don't need to disable them again.
But more importantly, the spin_lock_irqsave() overwrites "flags" and
that breaks things when we want to re-enable the IRQs when we call
spin_unlock_irqrestore(&ha->hardware_lock, flags);

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Dan Carpenter authored and James Bottomley committed Oct 25, 2010
1 parent b847917 commit 542bce1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1818,14 +1818,14 @@ qla2x00_init_rings(scsi_qla_host_t *vha)
qla2x00_init_response_q_entries(rsp);
}

spin_lock_irqsave(&ha->vport_slock, flags);
spin_lock(&ha->vport_slock);
/* Clear RSCN queue. */
list_for_each_entry(vp, &ha->vp_list, list) {
vp->rscn_in_ptr = 0;
vp->rscn_out_ptr = 0;
}

spin_unlock_irqrestore(&ha->vport_slock, flags);
spin_unlock(&ha->vport_slock);

ha->isp_ops->config_rings(vha);

Expand Down

0 comments on commit 542bce1

Please sign in to comment.