On Thu, Mar 02, 2023 at 11:19:57PM -0800, Eric Biggers wrote:
+void __blk_crypto_free_request(struct request *rq) +{ mempool_free(rq->crypt_ctx, bio_crypt_ctx_pool);
- blk_crypto_rq_set_defaults(rq);
- rq->crypt_ctx = NULL;
- /* The keyslot, if one was needed, should have been released earlier. */
- if (WARN_ON_ONCE(rq->crypt_keyslot))
__blk_crypto_rq_put_keyslot(rq);
}
I received a report that this WARN_ON_ONCE can be hit.
To fix this, attempt_merge() will need to release the keyslot too.
- Eric