drm/radeon: fix userptr lockup
Subsystems (2)
PATCH 1/1 drm/radeon: fix userptr lockup
From: Christian König <[email protected]>
We shouldn't try to reserve and wait for a BO that isn't bound. Otherwise we can run into a deadlock if we have a fault during binding the BO.
Signed-off-by Christian König <[email protected]>
--- drivers/gpu/drm/radeon/radeon_mn.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/radeon/radeon_mn.c +3 -0
@@ -142,6 +142,9 @@ static void radeon_mn_invalidate_range_start(struct mmu_notifier *mn,list_for_each_entry (bo, &node->bos, mn_list) { +if (!bo->tbo.ttm || bo->tbo.ttm->state != tt_bound) +continue ; + r =radeon_bo_reserve (bo, true);if (r) {DRM_ERROR ("(%ld) failed to reserve user bo\n" , r);
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Alex Deucher
AppliedQuoted 6 lines · Christian König
From: Christian König <[email protected]>
We shouldn't try to reserve and wait for a BO that isn't bound. Otherwise we can run into a deadlock if we have a fault during binding the BO.
Signed-off-by Christian König <[email protected]>
Applied to my -fixes tree.
Thanks,
Alex
Quoted 19 lines
--- drivers/gpu/drm/radeon/radeon_mn.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/radeon/radeon_mn.c +3
-1@@ -142,6 +142,9 @@ static void radeon_mn_invalidate_range_start(struct mmu_notifier *mn,list_for_each_entry (bo, &node->bos, mn_list) { +if (!bo->tbo.ttm || bo->tbo.ttm->state != tt_bound) +continue ; + r =radeon_bo_reserve (bo, true);if (r) {DRM_ERROR ("(%ld) failed to reserve user bo\n" , r); --
Quoted 2 lines
1.9.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel