diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2013-10-09 08:42:50 (GMT) |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-10-15 18:46:23 (GMT) |
commit | 26682480c202e7360cbcdc3bc9e962bf749c6b8d (patch) | |
tree | 5ab24256fc8f3743c3f7d4a35eff3bad1d184188 /drivers/gpu | |
parent | ebff5fa9d545574324095d9c6a3cb80c9157abc5 (diff) | |
download | linux-26682480c202e7360cbcdc3bc9e962bf749c6b8d.tar.xz |
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: 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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c index 0e67cf4..37fb4be 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c @@ -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); |