mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/amdgpu: Fix NULL ptr dereference issue for non userq fences
Add the correct fences count variable [num_fences] in the fences
array iteration to handle the userq / non-userq fences.
v2:(Christian)
- All fences in the array either come from some reservation object
or drm_syncobj. If any of those are NULL then there is a bug
somewhere else.
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
9ed335d939
commit
c9e20cb005
@@ -817,7 +817,7 @@ int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
|
||||
fences[num_fences++] = fence;
|
||||
}
|
||||
|
||||
for (i = 0, cnt = 0; i < wait_info->num_fences; i++) {
|
||||
for (i = 0, cnt = 0; i < num_fences; i++) {
|
||||
struct amdgpu_userq_fence_driver *fence_drv;
|
||||
struct amdgpu_userq_fence *userq_fence;
|
||||
u32 index;
|
||||
|
||||
Reference in New Issue
Block a user