[PATCH 1/2] qla1280: firmware load deadlocks kdump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The qla1280 driver calls request_firmware() holding the host_lock.  As this lock
is released during the process of loading the firmware into the board, it can be
released (and reacquired) around the call to request_firmware().  Doing so
eliminates the dump_stack() which occurs in local_bh_enable() due to holding
a spinlock.  It also corrects the deadlock which occurs attempting to capture
a kdump with kernel options "irqpoll maxcpus=1".

Signed-off-by: Michael Reed <mdr@xxxxxxx>


--- linux-2.6.32.5-0.1-a/drivers/scsi/qla1280.c	2009-12-02 21:51:21.000000000 -0600
+++ linux-2.6.32.5-0.1-b/drivers/scsi/qla1280.c	2010-02-04 16:23:10.831352910 -0600
@@ -1640,8 +1640,10 @@ qla1280_load_firmware_pio(struct scsi_ql
 	uint16_t mb[MAILBOX_REGISTER_COUNT], i;
 	int err;
 
+	spin_unlock_irq(ha->host->host_lock);
 	err = request_firmware(&fw, ql1280_board_tbl[ha->devnum].fwname,
 			       &ha->pdev->dev);
+	spin_lock_irq(ha->host->host_lock);
 	if (err) {
 		printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
 		       ql1280_board_tbl[ha->devnum].fwname, err);
@@ -1699,8 +1701,10 @@ qla1280_load_firmware_dma(struct scsi_ql
 		return -ENOMEM;
 #endif
 
+	spin_unlock_irq(ha->host->host_lock);
 	err = request_firmware(&fw, ql1280_board_tbl[ha->devnum].fwname,
 			       &ha->pdev->dev);
+	spin_lock_irq(ha->host->host_lock);
 	if (err) {
 		printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
 		       ql1280_board_tbl[ha->devnum].fwname, err);
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux