dm io: fix panic on large request
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 <4fc71305d292596831a01a4d34d4779c7772dbfd@redhat.com>
Cc: Chuck Ebbert <e088b27959f7aada4446330b8532a49988cf2997@redhat.com>
Cc: Patrick McHardy <3a4d625ce225e891399f98db96a382ac4a84080b@trash.net>
Acked-by: Alasdair G Kergon <620085386a2c64ec2f1d43bef997c15003f13da2@redhat.com>
Cc: Christophe Saout <0d099451edbf5d797581d87f40d0edec83ba71e3@saout.de>
Cc: <4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@kernel.org>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs