Commit 30c43282 authored by nagalakshmi.nandigama@lsi.com's avatar nagalakshmi.nandigama@lsi.com Committed by James Bottomley

[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: default avatarNagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Cc: stable@kernel.org
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent a6affbd5
...@@ -6749,6 +6749,7 @@ _scsih_mark_responding_raid_device(struct MPT2SAS_ADAPTER *ioc, u64 wwid, ...@@ -6749,6 +6749,7 @@ _scsih_mark_responding_raid_device(struct MPT2SAS_ADAPTER *ioc, u64 wwid,
} else } else
sas_target_priv_data = NULL; sas_target_priv_data = NULL;
raid_device->responding = 1; raid_device->responding = 1;
spin_unlock_irqrestore(&ioc->raid_device_lock, flags);
starget_printk(KERN_INFO, raid_device->starget, starget_printk(KERN_INFO, raid_device->starget,
"handle(0x%04x), wwid(0x%016llx)\n", handle, "handle(0x%04x), wwid(0x%016llx)\n", handle,
(unsigned long long)raid_device->wwid); (unsigned long long)raid_device->wwid);
...@@ -6759,16 +6760,16 @@ _scsih_mark_responding_raid_device(struct MPT2SAS_ADAPTER *ioc, u64 wwid, ...@@ -6759,16 +6760,16 @@ _scsih_mark_responding_raid_device(struct MPT2SAS_ADAPTER *ioc, u64 wwid,
*/ */
_scsih_init_warpdrive_properties(ioc, raid_device); _scsih_init_warpdrive_properties(ioc, raid_device);
if (raid_device->handle == handle) if (raid_device->handle == handle)
goto out; return;
printk(KERN_INFO "\thandle changed from(0x%04x)!!!\n", printk(KERN_INFO "\thandle changed from(0x%04x)!!!\n",
raid_device->handle); raid_device->handle);
raid_device->handle = handle; raid_device->handle = handle;
if (sas_target_priv_data) if (sas_target_priv_data)
sas_target_priv_data->handle = handle; sas_target_priv_data->handle = handle;
goto out; return;
} }
} }
out:
spin_unlock_irqrestore(&ioc->raid_device_lock, flags); spin_unlock_irqrestore(&ioc->raid_device_lock, flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment