diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2012-01-05 11:15:31 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-01-16 00:47:24 -0500 |
commit | 775bf2773858c50d2acfcdf71889984be94e7037 (patch) | |
tree | bde361db470dacb057a2a30e4e43798ad4922cbf /drivers/scsi | |
parent | f2d7e40e8069f0d6b4958dbda4383f412f53c7d1 (diff) |
[SCSI] hpsa: do not sleep in atomic context in rmmod path.
Don't call kthread_stop with a spin lock held and interrupts
disabled because kthread_stop will sleep waiting for the thread
to stop.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/hpsa.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 5140f5d0fd6..b96962c3944 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
@@ -4271,7 +4271,9 @@ static void stop_controller_lockup_detector(struct ctlr_info *h) | |||
4271 | remove_ctlr_from_lockup_detector_list(h); | 4271 | remove_ctlr_from_lockup_detector_list(h); |
4272 | /* If the list of ctlr's to monitor is empty, stop the thread */ | 4272 | /* If the list of ctlr's to monitor is empty, stop the thread */ |
4273 | if (list_empty(&hpsa_ctlr_list)) { | 4273 | if (list_empty(&hpsa_ctlr_list)) { |
4274 | spin_unlock_irqrestore(&lockup_detector_lock, flags); | ||
4274 | kthread_stop(hpsa_lockup_detector); | 4275 | kthread_stop(hpsa_lockup_detector); |
4276 | spin_lock_irqsave(&lockup_detector_lock, flags); | ||
4275 | hpsa_lockup_detector = NULL; | 4277 | hpsa_lockup_detector = NULL; |
4276 | } | 4278 | } |
4277 | spin_unlock_irqrestore(&lockup_detector_lock, flags); | 4279 | spin_unlock_irqrestore(&lockup_detector_lock, flags); |