summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorMartin Wilck <mwilck@suse.com>2019-04-29 11:48:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-25 18:23:40 +0200
commitf9eccf6ca1e01a0d2a76d4cd9ee5da9725c75561 (patch)
tree64f015a22628948003da13903ad47980965badd9 /include/uapi/linux
parent9407680a7bb79c2f9135794ece94a4aecd2d17b7 (diff)
dm mpath: always free attached_handler_name in parse_path()
commit 940bc471780b004a5277c1931f52af363c2fc9da upstream. Commit b592211c33f7 ("dm mpath: fix attached_handler_name leak and dangling hw_handler_name pointer") fixed a memory leak for the case where setup_scsi_dh() returns failure. But setup_scsi_dh may return success and not "use" attached_handler_name if the retain_attached_hwhandler flag is not set on the map. As setup_scsi_sh properly "steals" the pointer by nullifying it, freeing it unconditionally in parse_path() is safe. Fixes: b592211c33f7 ("dm mpath: fix attached_handler_name leak and dangling hw_handler_name pointer") Cc: stable@vger.kernel.org Reported-by: Yufen Yu <yuyufen@huawei.com> Signed-off-by: Martin Wilck <mwilck@suse.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions