Commit fed13a54 authored by Mikulas Patocka's avatar Mikulas Patocka
Browse files

dm: fix a crash if blk_alloc_disk fails



If blk_alloc_disk fails, the variable md->disk is set to an error value.
cleanup_mapped_device will see that md->disk is non-NULL and it will
attempt to access it, causing a crash on this statement
"md->disk->private_data = NULL;".

Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Reported-by: default avatarChenyuan Yang <chenyuan0y@gmail.com>
Closes: https://marc.info/?l=dm-devel&m=172824125004329&w=2


Cc: stable@vger.kernel.org
Reviewed-by: default avatarNitesh Shetty <nj.shetty@samsung.com>
parent 8e929cb5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment