Skip to content

Commit

Permalink
[SCSI] hpsa: do not sleep in atomic context in rmmod path.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
Stephen M. Cameron authored and James Bottomley committed Jan 16, 2012
1 parent f2d7e40 commit 775bf27
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/scsi/hpsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -4271,7 +4271,9 @@ static void stop_controller_lockup_detector(struct ctlr_info *h)
remove_ctlr_from_lockup_detector_list(h);
/* If the list of ctlr's to monitor is empty, stop the thread */
if (list_empty(&hpsa_ctlr_list)) {
spin_unlock_irqrestore(&lockup_detector_lock, flags);
kthread_stop(hpsa_lockup_detector);
spin_lock_irqsave(&lockup_detector_lock, flags);
hpsa_lockup_detector = NULL;
}
spin_unlock_irqrestore(&lockup_detector_lock, flags);
Expand Down

0 comments on commit 775bf27

Please sign in to comment.