linux/drivers/block/null_blk
Colin Ian King 90bf3e28ef null_blk: Fix null pointer dereference on nullb->disk on blk_cleanup_disk call
The error handling on a nullb->disk allocation currently jumps to
out_cleanup_disk that calls blk_cleanup_disk with a null pointer causing
a null pointer dereference issue. Fix this by jumping to out_cleanup_tags
instead.

Addresses-Coverity: ("Dereference after null check")
Fixes: 132226b301 ("null_blk: convert to blk_alloc_disk/blk_cleanup_disk")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210602100659.11058-1-colin.king@canonical.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-06-03 09:54:33 -06:00
..
Kconfig
main.c null_blk: Fix null pointer dereference on nullb->disk on blk_cleanup_disk call 2021-06-03 09:54:33 -06:00
Makefile
null_blk.h for-5.13/drivers-2021-04-27 2021-04-28 14:39:37 -07:00
trace.c
trace.h
zoned.c drivers/block/null_blk/main: Fix a double free in null_init. 2021-04-26 09:04:40 -06:00