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

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
...@@ -970,7 +970,7 @@ void vmw_resource_unreserve(struct vmw_resource *res, ...@@ -970,7 +970,7 @@ void vmw_resource_unreserve(struct vmw_resource *res,
if (new_backup) if (new_backup)
res->backup_offset = new_backup_offset; res->backup_offset = new_backup_offset;
if (!res->func->may_evict) if (!res->func->may_evict || res->id == -1)
return; return;
write_lock(&dev_priv->resource_lock); write_lock(&dev_priv->resource_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment