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
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>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
thomashvmw authored and airlied committed Oct 15, 2013
1 parent ebff5fa commit 2668248
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
Original file line number Diff line number Diff line change
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 2668248

Please sign in to comment.