projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21fd049
)
memstick: fix hangs on unexpected device removal in mspro_blk
author
Maxim Levitsky
<
[email protected]
>
Wed, 11 Aug 2010 21:17:52 +0000
(14:17 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 12 Aug 2010 15:43:31 +0000
(08:43 -0700)
mspro_block_remove() is called from detect thread that first calls the
mspro_block_stop(), which stops the request queue. If we call
del_gendisk() with the queue stopped we get a deadlock.
Signed-off-by: Maxim Levitsky <
[email protected]
>
Cc: Alex Dubov <
[email protected]
>
Cc: <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/memstick/core/mspro_block.c
patch
|
blob
|
history
diff --git
a/drivers/memstick/core/mspro_block.c
b/drivers/memstick/core/mspro_block.c
index aa5ac6efd9b94c2937bb8bcdd4d0797e43f66c1a..d3f1a087ecedf8545d4e765716a79c94406f6458 100644
(file)
--- a/
drivers/memstick/core/mspro_block.c
+++ b/
drivers/memstick/core/mspro_block.c
@@
-1339,13
+1339,14
@@
static void mspro_block_remove(struct memstick_dev *card)
struct mspro_block_data *msb = memstick_get_drvdata(card);
unsigned long flags;
- del_gendisk(msb->disk);
- dev_dbg(&card->dev, "mspro block remove\n");
spin_lock_irqsave(&msb->q_lock, flags);
msb->eject = 1;
blk_start_queue(msb->queue);
spin_unlock_irqrestore(&msb->q_lock, flags);
+ del_gendisk(msb->disk);
+ dev_dbg(&card->dev, "mspro block remove\n");
+
blk_cleanup_queue(msb->queue);
msb->queue = NULL;