Skip to content

Commit

Permalink
drm/vmwgfx: Don't put resources with invalid id's on lru list
Browse files Browse the repository at this point in the history
commit 2668248 upstream.

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

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
thomashvmw authored and gregkh committed Nov 13, 2013
1 parent c082ab3 commit 598b53e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
Expand Up @@ -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);
Expand Down

0 comments on commit 598b53e

Please sign in to comment.