]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdkfd: Fix reference count leaks.
authorQiushi Wu <wu000273@umn.edu>
Sat, 13 Jun 2020 19:32:26 +0000 (14:32 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:22:25 +0000 (11:22 +0200)
commit4704cd249f8d28c5cd9fe29148e6833f0dd54b02
treed31c086e40a6c3ab3b75b0b4dae5d2a0bd6dc363
parent0c98247932705214d189ddcf2f0fb5292612b4bc
drm/amdkfd: Fix reference count leaks.

[ Upstream commit 20eca0123a35305e38b344d571cf32768854168c ]

kobject_init_and_add() takes reference even when it fails.
If this function returns an error, kobject_put() must be called to
properly clean up the memory associated with the object.

Signed-off-by: Qiushi Wu <wu000273@umn.edu>
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdkfd/kfd_topology.c