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

Commit 26682480 authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Dave Airlie
Browse files

drm/vmwgfx: Don't put resources with invalid id's on lru list



The evict code may try to swap them out causing a BUG in the destroy
function.

Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: default avatarJakob Bornecrantz <jakob@vmware.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent ebff5fa9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -970,7 +970,7 @@ void vmw_resource_unreserve(struct vmw_resource *res,
	if (new_backup)
		res->backup_offset = new_backup_offset;

	if (!res->func->may_evict)
	if (!res->func->may_evict || res->id == -1)
		return;

	write_lock(&dev_priv->resource_lock);