mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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
dec_pending
bio_endio(...);
<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: Milan Broz <[email protected]>
Cc: Chuck Ebbert <[email protected]>
Cc: Patrick McHardy <[email protected]>
Acked-by: Alasdair G Kergon <[email protected]>
Cc: Christophe Saout <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
d3fec424b2
commit
80b16c192e
1 changed files with 2 additions and 0 deletions
|
|
@ -920,6 +920,8 @@ static void crypt_dtr(struct dm_target *ti)
|
|||
{
|
||||
struct crypt_config *cc = (struct crypt_config *) ti->private;
|
||||
|
||||
flush_workqueue(_kcryptd_workqueue);
|
||||
|
||||
bioset_free(cc->bs);
|
||||
mempool_destroy(cc->page_pool);
|
||||
mempool_destroy(cc->io_pool);
|
||||
|
|
|
|||
Loading…
Reference in a new issue