Commit 80b16c19 authored by Milan Broz's avatar Milan Broz Committed by Linus Torvalds
Browse files

dm io: fix panic on large request

Flush workqueue before releasing bioset and mopools in dm-crypt.  There can
be finished but not yet released request.

Call chain causing oops:
  run workqueue
      	<remove device request - remove mempool>
      mempool_free(io, cc->io_pool);

This usually happens when cryptsetup create temporary
luks mapping in the beggining of crypt device activation.

When dm-core calls destructor crypt_dtr, no new request
are possible.
Signed-off-by: default avatarMilan Broz <>
Cc: Chuck Ebbert <>
Cc: Patrick McHardy <>
Acked-by: default avatarAlasdair G Kergon <>
Cc: Christophe Saout <>
Cc: <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent d3fec424
......@@ -920,6 +920,8 @@ static void crypt_dtr(struct dm_target *ti)
struct crypt_config *cc = (struct crypt_config *) ti->private;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment