aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas
diff options
context:
space:
mode:
authornagalakshmi.nandigama@lsi.com <nagalakshmi.nandigama@lsi.com>2011-11-30 21:22:56 -0500
committerJames Bottomley <JBottomley@Parallels.com>2011-12-15 01:57:39 -0500
commit30c43282f3d347f47f9e05199d2b14f56f3f2837 (patch)
treeb656facf9d6bf00b62fe0f189ad34977aa91c143 /drivers/scsi/mpt2sas
parenta6affbd5ccbb45e03168996bae4a4d0abb780874 (diff)
[SCSI] mpt2sas: Release spinlock for the raid device list before blocking it
Added code to release the spinlock that is used to protect the raid device list before calling a function that can block. The blocking was causing a reschedule, and subsequently it is tried to acquire the same lock, resulting in a panic (NMI Watchdog detecting a CPU lockup). Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> Cc: stable@kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/mpt2sas')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 06117207f601..8e2e9973df29 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -6749,6 +6749,7 @@ _scsih_mark_responding_raid_device(struct MPT2SAS_ADAPTER *ioc, u64 wwid,
6749 } else 6749 } else
6750 sas_target_priv_data = NULL; 6750 sas_target_priv_data = NULL;
6751 raid_device->responding = 1; 6751 raid_device->responding = 1;
6752 spin_unlock_irqrestore(&ioc->raid_device_lock, flags);
6752 starget_printk(KERN_INFO, raid_device->starget, 6753 starget_printk(KERN_INFO, raid_device->starget,
6753 "handle(0x%04x), wwid(0x%016llx)\n", handle, 6754 "handle(0x%04x), wwid(0x%016llx)\n", handle,
6754 (unsigned long long)raid_device->wwid); 6755 (unsigned long long)raid_device->wwid);
@@ -6759,16 +6760,16 @@ _scsih_mark_responding_raid_device(struct MPT2SAS_ADAPTER *ioc, u64 wwid,
6759 */ 6760 */
6760 _scsih_init_warpdrive_properties(ioc, raid_device); 6761 _scsih_init_warpdrive_properties(ioc, raid_device);
6761 if (raid_device->handle == handle) 6762 if (raid_device->handle == handle)
6762 goto out; 6763 return;
6763 printk(KERN_INFO "\thandle changed from(0x%04x)!!!\n", 6764 printk(KERN_INFO "\thandle changed from(0x%04x)!!!\n",
6764 raid_device->handle); 6765 raid_device->handle);
6765 raid_device->handle = handle; 6766 raid_device->handle = handle;
6766 if (sas_target_priv_data) 6767 if (sas_target_priv_data)
6767 sas_target_priv_data->handle = handle; 6768 sas_target_priv_data->handle = handle;
6768 goto out; 6769 return;
6769 } 6770 }
6770 } 6771 }
6771 out: 6772
6772 spin_unlock_irqrestore(&ioc->raid_device_lock, flags); 6773 spin_unlock_irqrestore(&ioc->raid_device_lock, flags);
6773} 6774}
6774 6775