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)
commit5407334c53e9922c1c3fb28801e489d0b74f2c8d
tree5d805446be4e3225c43f07bb7c26439edce53508
parent452c0bf8754fbeffdf579465b82a3c2bbe373c95
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: 3175199ab0ac ("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