Skip to content

Commit 3148a6a

Browse files
Jack Zhangalexdeucher
authored andcommitted
drm/amdkfd: kfree the wrong pointer
Originally, it kfrees the wrong pointer for mem_obj. It would cause memory leak under stress test. Signed-off-by: Jack Zhang <[email protected]> Acked-by: Nirmoy Das <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent d6e7042 commit 3148a6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/amdkfd/kfd_device.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,9 +1112,9 @@ int kfd_gtt_sa_allocate(struct kfd_dev *kfd, unsigned int size,
11121112
return 0;
11131113

11141114
kfd_gtt_no_free_chunk:
1115-
pr_debug("Allocation failed with mem_obj = %p\n", mem_obj);
1115+
pr_debug("Allocation failed with mem_obj = %p\n", *mem_obj);
11161116
mutex_unlock(&kfd->gtt_sa_lock);
1117-
kfree(mem_obj);
1117+
kfree(*mem_obj);
11181118
return -ENOMEM;
11191119
}
11201120

0 commit comments

Comments
 (0)