aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2005-10-25 14:00:56 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-25 16:51:48 -0400
commit444d1d9bb5b724f03344c9317bc01d54a9b39073 (patch)
tree6514f1acdc991777e6703510753f6988cbd00654 /drivers
parent0db9ae4a79381a5a3d272ccb51851c48c4bcbb6d (diff)
[PATCH] qlogic lockup fix
If qla2x00_probe_one()'s call to qla2x00_iospace_config() fails, we call qla2x00_free_device() to clean up. But because ha->dpc_pid hasn't been set yet, qla2x00_free_device() tries to stop a kernel thread which hasn't started yet. It does wait_for_completion() against an uninitialised completion struct and the kernel hangs up. Fix it by initialising ha->dpc_pid a bit earlier. Cc: Andrew Vasquez <andrew.vasquez@qlogic.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 8982978c42fd..7aec93f9d423 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1325,6 +1325,8 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
1325 ha->brd_info = brd_info; 1325 ha->brd_info = brd_info;
1326 sprintf(ha->host_str, "%s_%ld", ha->brd_info->drv_name, ha->host_no); 1326 sprintf(ha->host_str, "%s_%ld", ha->brd_info->drv_name, ha->host_no);
1327 1327
1328 ha->dpc_pid = -1;
1329
1328 /* Configure PCI I/O space */ 1330 /* Configure PCI I/O space */
1329 ret = qla2x00_iospace_config(ha); 1331 ret = qla2x00_iospace_config(ha);
1330 if (ret) 1332 if (ret)
@@ -1448,7 +1450,6 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
1448 */ 1450 */
1449 spin_lock_init(&ha->mbx_reg_lock); 1451 spin_lock_init(&ha->mbx_reg_lock);
1450 1452
1451 ha->dpc_pid = -1;
1452 init_completion(&ha->dpc_inited); 1453 init_completion(&ha->dpc_inited);
1453 init_completion(&ha->dpc_exited); 1454 init_completion(&ha->dpc_exited);
1454 1455