Skip to content
Snippets Groups Projects
Commit 90bf3e28 authored by Colin Ian King's avatar Colin Ian King Committed by Jens Axboe
Browse files

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: 132226b3 ("null_blk: convert to blk_alloc_disk/blk_cleanup_disk")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210602100659.11058-1-colin.king@canonical.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 0e0ccdec
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment