public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] qla2xxx: locking problem in qla2x00_init_rings()
@ 2010-09-12 21:40 Dan Carpenter
  2010-09-14 23:52 ` Madhu Iyengar
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-09-12 21:40 UTC (permalink / raw)
  To: Andrew Vasquez
  Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Lalit Chandivade,
	James E.J. Bottomley, linux-driver-h88ZbnxC6KDQT0dZR+AlfA,
	arun.easi-h88ZbnxC6KDQT0dZR+AlfA, Giridhar Malavali

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>
---
This seems like an important bug.  I don't have this hardware but could
someone from QLogic test this out and maybe queue it up for 2.6.36?

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 9c383ba..9f4ba28 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1787,14 +1787,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);
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-14 23:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-12 21:40 [patch] qla2xxx: locking problem in qla2x00_init_rings() Dan Carpenter
2010-09-14 23:52 ` Madhu Iyengar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox