提交 113cd9da 编写于 作者: J Junwei Zhang 提交者: Alex Deucher

drm/amdgpu: adjust the judgement of removing fence callback

The fence in the array may be skipped if wait_all is false,
thus the related callback is not initialized with list head.
So removing this kind callback will cause NULL pointer reference.
Signed-off-by: NJunwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: NJammy Zhou <Jammy.Zhou@amd.com>
上级 9066b0c3
...@@ -966,7 +966,7 @@ signed long amdgpu_fence_wait_multiple(struct amdgpu_device *adev, ...@@ -966,7 +966,7 @@ signed long amdgpu_fence_wait_multiple(struct amdgpu_device *adev,
fence_rm_cb: fence_rm_cb:
for (idx = 0; idx < count; ++idx) { for (idx = 0; idx < count; ++idx) {
fence = array[idx]; fence = array[idx];
if (fence) if (fence && cb[idx].base.func)
fence_remove_callback(fence, &cb[idx].base); fence_remove_callback(fence, &cb[idx].base);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册