]> git.ipfire.org Git - people/ms/linux.git/commit
dm: fix deadlock with request based dm and queue request_fn recursion
authorJens Axboe <axboe@kernel.dk>
Tue, 6 Nov 2012 11:24:26 +0000 (12:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Dec 2012 19:47:07 +0000 (11:47 -0800)
commitf42513b9fd98a0f3afa8fe9bc23700b4226e1f6f
tree5176c37db1f8520cab12fe122cb46c3045d20d47
parentecf049ce86e1d93bc9a3376facf31d7244338089
dm: fix deadlock with request based dm and queue request_fn recursion

commit a8c32a5c98943d370ea606a2e7dc04717eb92206 upstream.

Request based dm attempts to re-run the request queue off the
request completion path. If used with a driver that potentially does
end_io from its request_fn, we could deadlock trying to recurse
back into request dispatch. Fix this by punting the request queue
run to kblockd.

Tested to fix a quickly reproducible deadlock in such a scenario.

Acked-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm.c