projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e4aeff
)
drm/amdgpu/debugfs: fix memory leak when amdgpu_virt_enable_access_debugfs failed
author
Chen Tao
<chentao107@huawei.com>
Wed, 17 Jun 2020 10:51:30 +0000
(18:51 +0800)
committer
Alex Deucher
<alexander.deucher@amd.com>
Wed, 1 Jul 2020 05:59:22 +0000
(
01:59
-0400)
Fix memory leak in amdgpu_debugfs_gpr_read not freeing data when
amdgpu_virt_enable_access_debugfs failed.
Fixes:
95a2f917387a2
("drm/amdgpu: restrict debugfs register access under SR-IOV")
Signed-off-by: Chen Tao <chentao107@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index
3d0e8f8
..
0ac9aab
100644
(file)
--- a/
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@
-941,7
+941,7
@@
static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf,
r = amdgpu_virt_enable_access_debugfs(adev);
if (r < 0)
-
return
r;
+
goto er
r;
/* switch to the specific se/sh/cu */
mutex_lock(&adev->grbm_idx_mutex);