diff options
| author | 2012-11-23 12:06:05 -1000 | |
|---|---|---|
| committer | 2012-11-23 12:06:05 -1000 | |
| commit | a8946afe5a3519bf4fd84d87f94c92d49f2f13d8 (patch) | |
| tree | ee9e9f4b0126cbc592980580312d9f3ddc4a4c68 /drivers/md/dm.c | |
| parent | Merge tag 'omapdss-for-3.7-rc' of git://gitorious.org/linux-omap-dss2/linux (diff) | |
| parent | block: Don't access request after it might be freed (diff) | |
| download | wireguard-linux-a8946afe5a3519bf4fd84d87f94c92d49f2f13d8.tar.xz wireguard-linux-a8946afe5a3519bf4fd84d87f94c92d49f2f13d8.zip | |
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block layer fixes from Jens Axboe:
"Distilled down version of bug fixes for 3.7. The patches have been
well tested. If you notice that commit dates are from today, it's
because I pulled less important bits out and shuffled them into the
3.8 mix. Apart from that, no changes, base still the same.
It contains:
- Fix for aoe, don't run request_fn while it's plugged.
- Fix for a regression in floppy since 3.6, which causes problems if
no floppy is found.
- Stable fix for blk_exec(), don't touch a request after it has been
sent to the scheduler (and the device as well).
- Five fixes for various nasties in mtip32xx."
* 'for-linus' of git://git.kernel.dk/linux-block:
block: Don't access request after it might be freed
mtip32xx: Fix padding issue
aoe: avoid running request handler on plugged queue
mtip32xx: fix potential NULL pointer dereference in mtip_timeout_function()
mtip32xx: fix shift larger than type warning
mtip32xx: Fix incorrect mask used for erase mode
mtip32xx: Fix to make lba address correct in big-endian systems
mtip32xx: fix potential crash on SEC_ERASE_UNIT
dm: fix deadlock with request based dm and queue request_fn recursion
floppy: destroy floppy workqueue before cleaning up the queue
Diffstat (limited to '')
| -rw-r--r-- | drivers/md/dm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 02db9183ca01..77e6eff41cae 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -740,8 +740,14 @@ static void rq_completed(struct mapped_device *md, int rw, int run_queue) if (!md_in_flight(md)) wake_up(&md->wait); + /* + * Run this off this callpath, as drivers could invoke end_io while + * inside their request_fn (and holding the queue lock). Calling + * back into ->request_fn() could deadlock attempting to grab the + * queue lock again. + */ if (run_queue) - blk_run_queue(md->queue); + blk_run_queue_async(md->queue); /* * dm_put() must be at the end of this function. See the comment above |
