]> git.baikalelectronics.ru Git - kernel.git/commit
block-crypto-fallback: use a bio_set for splitting bios
authorChristoph Hellwig <hch@lst.de>
Wed, 24 Feb 2021 07:24:04 +0000 (08:24 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 Feb 2021 15:55:00 +0000 (08:55 -0700)
commit074a465b4d9d26eb745d1b217afcb09b8744198b
tree5d805446be4e3225c43f07bb7c26439edce53508
parent21b78dd93c3e65d1a94d3aaa70e57b6f87690c57
block-crypto-fallback: use a bio_set for splitting bios

bio_split with a NULL bs argumen used to fall back to kmalloc the
bio, which does not guarantee forward progress and could to deadlocks.
Now that the overloading of the NULL bs argument to bio_alloc_bioset
has been removed it crashes instead.  Fix all that by using a special
crafted bioset.

Fixes: cc230f208d97 ("block: split bio_kmalloc from bio_alloc_bioset")
Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-crypto-fallback.c