mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-09 01:59:41 +00:00
drm/amdkfd: kfree the wrong pointer
[ Upstream commit 3148a6a0ef
]
Originally, it kfrees the wrong pointer for mem_obj.
It would cause memory leak under stress test.
Signed-off-by: Jack Zhang <Jack.Zhang1@amd.com>
Acked-by: Nirmoy Das <nirmoy.das@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
67e5b70909
commit
044a884072
1 changed files with 2 additions and 2 deletions
|
@ -921,9 +921,9 @@ int kfd_gtt_sa_allocate(struct kfd_dev *kfd, unsigned int size,
|
|||
return 0;
|
||||
|
||||
kfd_gtt_no_free_chunk:
|
||||
pr_debug("Allocation failed with mem_obj = %p\n", mem_obj);
|
||||
pr_debug("Allocation failed with mem_obj = %p\n", *mem_obj);
|
||||
mutex_unlock(&kfd->gtt_sa_lock);
|
||||
kfree(mem_obj);
|
||||
kfree(*mem_obj);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue