diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2013-10-09 01:42:50 -0700 |
---|---|---|
committer | Kamal Mostafa <kamal@canonical.com> | 2013-11-07 13:50:06 -0800 |
commit | 86354bd5fff3436e59bd7aa217ea15d44d39e8e8 (patch) | |
tree | 7641ed7bcc1291221fc5e9ad505ba814c9290686 | |
parent | 20e95b44f8e2c20c7f8b2a3303e4637fc5cabf14 (diff) |
drm/vmwgfx: Don't put resources with invalid id's on lru list
commit 26682480c202e7360cbcdc3bc9e962bf749c6b8d 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: Kamal Mostafa <kamal@canonical.com>
-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 e01a17b407b2..64530290c642 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c @@ -971,7 +971,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); |