drm/nouveau: call ttm_bo_wait with the bo lock held to prevent hang
Subsystems (3)
PATCH 1/1 drm/nouveau: call ttm_bo_wait with the bo lock held to prevent hang
nouveau_gem_ioctl_cpu_prep calls ttm_bo_wait without the bo lock held. ttm_bo_wait unlocks that lock, and so must be called with it held.
Currently this bug causes libdrm nouveau_bo_busy() to hang the machine.
--- drivers/gpu/drm/nouveau/nouveau_gem.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/gpu/drm/nouveau/nouveau_gem.c +2 -0
@@ -925,7 +925,9 @@ nouveau_gem_ioctl_cpu_prep(struct drm_device *dev, void *data, }if (req->flags &NOUVEAU_GEM_CPU_PREP_NOBLOCK ) { +spin_lock (&nvbo->bo.lock); ret =ttm_bo_wait (&nvbo->bo, false, false, no_wait); +spin_unlock (&nvbo->bo.lock); }else { ret =ttm_bo_synccpu_write_grab (&nvbo->bo, no_wait);if (ret ==0 )
Signature · 1 line
1.6.3.3
A message that is not in the archive (sent off-list or not yet received): 1264197973-23043-1-git-send-email-luca-Ukmtq+NC3rhBHFWNQifrYwC/[email protected]
Please apply or state objections to this patch.
Thanks.
A message that is not in the archive (sent off-list or not yet received): ff13bc9a1001280828k344446d1qca2a333bbdcb8bd9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Looks sane to me, it would be nice if someone else also agreed, before committing.
Quoted 8 lines · Luca Barbieri
Please apply or state objections to this patch.
Thanks.
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
A message that is not in the archive (sent off-list or not yet received): 6d4bc9fc1001281333ndf6065j8e1c6db6a87b0395-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Maarten Maathuis
Acked-byQuoted 13 lines · Maarten Maathuis
Looks sane to me, it would be nice if someone else also agreed, before committing.
Quoted 8 lines · Luca Barbieri
Please apply or state objections to this patch.
Thanks.
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
Quoted 3 lines · Luca Barbieri
Please apply or state objections to this patch.
Thanks.
Thanks, pushed.
Quoted 4 lines
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau