projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99147e6
)
drm/amdgpu: Fix a NULL deref in amdgpu_vm_add_prt_cb()
author
Dan Carpenter
<
[email protected]
>
Mon, 3 Apr 2017 18:41:39 +0000
(21:41 +0300)
committer
Alex Deucher
<
[email protected]
>
Tue, 4 Apr 2017 18:42:21 +0000
(14:42 -0400)
We accidentally dereference "cb" if the kmalloc() fails.
Fixes: 451bc8eb8fe6 ("drm/amdgpu: fix PRT teardown on VM fini v3")
Reviewed-by: Christian König <
[email protected]
>
Reviewed-by: Harry Wentland <
[email protected]
>
Signed-off-by: Dan Carpenter <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 5f3d932e77f21f93a2b33da3bdf599f5b08e0928..8c7de55f57153111c8fd70e1e94448071e4a9eae 100644
(file)
--- a/
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@
-1528,7
+1528,7
@@
static void amdgpu_vm_add_prt_cb(struct amdgpu_device *adev,
if (fence)
dma_fence_wait(fence, false);
- amdgpu_vm_prt_put(
cb->
adev);
+ amdgpu_vm_prt_put(adev);
} else {
cb->adev = adev;
if (!fence || dma_fence_add_callback(fence, &cb->cb,