]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[PATCH] dm io: fix panic on large request
authorMilan Broz <mbroz@redhat.com>
Sat, 21 Jul 2007 11:37:27 +0000 (04:37 -0700)
committerWilly Tarreau <w@1wt.eu>
Sat, 25 Aug 2007 15:24:08 +0000 (17:24 +0200)
commit04745f208c5b7de16fb35628b0003744b760b2cd
tree335a4c02780dc862a8e481355af3ca81cbdd7cdc
parent32419ed8545cf3becdc84cfee0efd62becb48b4d
[PATCH] 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 <mbroz@redhat.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Cc: Patrick McHardy <kaber@trash.net>
Acked-by: Alasdair G Kergon <agk@redhat.com>
Cc: Christophe Saout <christophe@saout.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/md/dm-crypt.c