On 07/10/24 01:38PM, Mikulas Patocka wrote:

Hi

Here I'm submitting a patch for this bug.

Mikulas


From: Mikulas Patocka <mpato...@redhat.com>

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: Mikulas Patocka <mpato...@redhat.com>
Reported-by: Chenyuan Yang <chenyua...@gmail.com>
Closes: https://marc.info/?l=dm-devel&m=172824125004329&w=2
Cc: sta...@vger.kernel.org

Reviewed-by: Nitesh Shetty <nj.she...@samsung.com>


Reply via email to