Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27f06b2d authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Dave Airlie
Browse files

drm/nouveau: complain loudly if buffer is pinned during destruction



Shouldn't happen, and we invert the struct_mutex with reservation here,
potentially leading to deadlocks. Once reservations become lockdep annotated,
lockdep will go splat on this.

Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 1e2bd5f5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -50,7 +50,8 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
		return;
	nvbo->gem = NULL;

	if (unlikely(nvbo->pin_refcnt)) {
	/* Lockdep hates you for doing reserve with gem object lock held */
	if (WARN_ON_ONCE(nvbo->pin_refcnt)) {
		nvbo->pin_refcnt = 1;
		nouveau_bo_unpin(nvbo);
	}