]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
blk-crypto: use on-stack skcipher requests for fallback en/decryption
authorChristoph Hellwig <hch@lst.de>
Fri, 9 Jan 2026 06:07:46 +0000 (07:07 +0100)
committerJens Axboe <axboe@kernel.dk>
Sun, 11 Jan 2026 19:55:41 +0000 (12:55 -0700)
commit2f655dcb2d925b55deb8c1ec8f42b522c6bc5698
treee692fdd2071f8e68e54f1846e3b987c86c291628
parentb37fbce460ad60b0c4449c1c7566cf24f3016713
blk-crypto: use on-stack skcipher requests for fallback en/decryption

Allocating a skcipher request dynamically can deadlock or cause
unexpected I/O failures when called from writeback context.  Avoid the
allocation entirely by using on-stack skciphers, similar to what the
non-blk-crypto fscrypt path already does.

This drops the incomplete support for asynchronous algorithms, which
previously could be used, but only synchronously.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-crypto-fallback.c