* [PATCH] hpsa: do not sleep in atomic context in rmmod path.
@ 2012-01-05 16:15 Stephen M. Cameron
0 siblings, 0 replies; only message in thread
From: Stephen M. Cameron @ 2012-01-05 16:15 UTC (permalink / raw)
To: james.bottomley
Cc: linux-scsi, linux-kernel, mikem, stephenmcameron, thenzl, akpm, stable
From: Stephen M. Cameron <scameron@beardog.cce.hp.com>
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>
---
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 865d452..a0ba29d 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -4269,7 +4269,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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-05 16:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-05 16:15 [PATCH] hpsa: do not sleep in atomic context in rmmod path Stephen M. Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).