[PATCH] drm/amd/amdkfd: fix possible memory leak in svm_range_restore_pages

2021-09-09 Thread Xiyu Yang
to label "out", in which kfd_unref_process() decreases the refcount. Signed-off-by: Xiyu Yang Signed-off-by: Xin Xiong Signed-off-by: Xin Tan --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm

[PATCH] drm/amdgpu/display: Fix dc_sink refcnt leak in dc_link_detect_helper

2020-04-23 Thread Xiyu Yang
issue happens in one exception handling path of dc_link_detect_helper(). When alt mode times out, the function forgets to decrease the refcnt increased by dc_sink_retain(), causing a refcnt leak. Fix this issue by calling dc_sink_release() when alt mode times out. Signed-off-by: Xiyu Yang Signed-off-by: X

[PATCH] drm/amdgpu/display: Fix dc_sink refcnt leak when detecting link

2020-04-23 Thread Xiyu Yang
pens in all paths of emulated_link_detect(), which forgets to decrease the refcnt increased by dc_sink_retain(), causing a refcnt leak. Fix this issue by adding a "err_sink_put" label and calling dc_sink_release() before emulated_link_detect() returns. Signed-off-by: Xiyu Yang Signed-off