This series fixes a race condition in blk-crypto keyslot management and makes some related cleanups. It replaces "[PATCH] blk-crypto: make blk_crypto_evict_key() always try to evict" (https://lore.kernel.org/r/20230226203816.207449-1-ebiggers@xxxxxxxxxx), which was a simpler fix but didn't fix the keyslot reference counting to work as expected. Changed in v3: - Add a patch that makes blk_crypto_evict_key() return void - Add a patch that makes blk_insert_cloned_request() pass on the actual error code from blk_crypto_rq_put_keyslot() - Use gotos in __blk_crypto_evict_key() Changed in v2: - Call blk_crypto_rq_put_keyslot() when requests are merged - Add and use blk_crypto_rq_has_keyslot() - Add patch "blk-crypto: drop the NULL check from blk_crypto_put_keyslot()" Eric Biggers (6): blk-mq: release crypto keyslot before reporting I/O complete blk-crypto: make blk_crypto_evict_key() return void blk-crypto: make blk_crypto_evict_key() more robust blk-crypto: remove blk_crypto_insert_cloned_request() blk-mq: return actual keyslot error in blk_insert_cloned_request() blk-crypto: drop the NULL check from blk_crypto_put_keyslot() Documentation/block/inline-encryption.rst | 3 +- block/blk-crypto-internal.h | 38 ++++++------- block/blk-crypto-profile.c | 60 +++++++++------------ block/blk-crypto.c | 66 +++++++++++++---------- block/blk-merge.c | 2 + block/blk-mq.c | 20 +++++-- drivers/md/dm-table.c | 19 ++----- include/linux/blk-crypto.h | 4 +- 8 files changed, 110 insertions(+), 102 deletions(-) base-commit: eeac8ede17557680855031c6f305ece2378af326 -- 2.39.2