]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dm mpath: Add missing dm_put_device when failing to get scsi dh name
authorBenjamin Marzinski <bmarzins@redhat.com>
Wed, 28 Jan 2026 00:12:22 +0000 (19:12 -0500)
committerMikulas Patocka <mpatocka@redhat.com>
Wed, 28 Jan 2026 14:43:34 +0000 (15:43 +0100)
commit787bd63ee661b0148ce8e1fde92b7afddd85c446
treec554914ab64f8be3e2d2ab9cf6fbd91fffe6c273
parentec8534021a71ebdea2ba565a2a147f2464e36356
dm mpath: Add missing dm_put_device when failing to get scsi dh name

When commit fd81bc5cca8f ("scsi: device_handler: Return error pointer in
scsi_dh_attached_handler_name()") added code to fail parsing the path if
scsi_dh_attached_handler_name() failed with -ENOMEM, it didn't clean up
the reference to the path device that had just been taken. Fix this, and
steamline the error paths of parse_path() a little.

Fixes: fd81bc5cca8f ("scsi: device_handler: Return error pointer in scsi_dh_attached_handler_name()")
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-mpath.c