aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-11-11 22:59:29 +0800
committerMichael Ellerman <mpe@ellerman.id.au>2022-11-24 23:31:44 +1100
commit295faa17722a11cac8dbf51e4c9f9405a5e07ef1 (patch)
tree1f633a6c238a22f8e289d0d4e29957eb578d48f7 /tools/perf/scripts/python/bin
parentcxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter() (diff)
downloadlinux-295faa17722a11cac8dbf51e4c9f9405a5e07ef1.tar.gz
linux-295faa17722a11cac8dbf51e4c9f9405a5e07ef1.zip
ocxl: fix possible name leak in ocxl_file_register_afu()
If device_register() returns error in ocxl_file_register_afu(), the name allocated by dev_set_name() need be freed. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So fix this by calling put_device(), then the name can be freed in kobject_cleanup(), and info is freed in info_release(). Fixes: 75ca758adbaf ("ocxl: Create a clear delineation between ocxl backend & frontend") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Acked-by: Andrew Donnellan <ajd@linux.ibm.com> Acked-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20221111145929.2429271-1-yangyingliang@huawei.com
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions