]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm log userspace: fix memory leak in dm_ulog_tfr_init failure path
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Wed, 1 Oct 2014 20:58:35 +0000 (22:58 +0200)
committerJiri Slaby <jslaby@suse.cz>
Thu, 13 Nov 2014 18:02:22 +0000 (19:02 +0100)
commit93232824e2c3aa8173a1060fbf9acea7f477d53c
tree55358a8aa8de56a6d7905edf125e5f0863a7210f
parent40e8412c09dbb9a60aaba93a91c4d56e88caa9c8
dm log userspace: fix memory leak in dm_ulog_tfr_init failure path

commit 56ec16cb1e1ce46354de8511eef962a417c32c92 upstream.

If cn_add_callback() fails in dm_ulog_tfr_init(), it does not
deallocate prealloced memory but calls cn_del_callback().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/md/dm-log-userspace-transfer.c