linux_dsm_epyc7002/drivers/gpu/drm/amd
Bernard Zhao b5b78a6c8d drm/amd: fix potential memleak in err branch
The function kobject_init_and_add alloc memory like:
kobject_init_and_add->kobject_add_varg->kobject_set_name_vargs
->kvasprintf_const->kstrdup_const->kstrdup->kmalloc_track_caller
->kmalloc_slab, in err branch this memory not free. If use
kmemleak, this path maybe catched.
These changes are to add kobject_put in kobject_init_and_add
failed branch, fix potential memleak.

Signed-off-by: Bernard Zhao <bernard@vivo.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2020-06-24 18:03:16 -04:00
..
acp drm: amd/acp: fix broken menu structure 2020-03-13 11:52:35 -04:00
amdgpu drm/amdgpu: add fw release for sdma v5_0 2020-06-24 18:02:39 -04:00
amdkfd drm/amd: fix potential memleak in err branch 2020-06-24 18:03:16 -04:00
display drm/amd/display: Fix ineffective setting of max bpc property 2020-06-24 18:03:09 -04:00
include drm/amdgpu: add apu flags (v2) 2020-05-22 13:41:53 -04:00
powerplay drm/amdgpu: Replace invalid device ID with a valid device ID 2020-06-11 16:05:09 -04:00