diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2013-10-09 04:42:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-12 22:05:34 -0500 |
commit | 0d6d09974ba93877afa53f5ce5ce89f20b3dfe20 (patch) | |
tree | 19d66a3e9e09f972f921529c5d159d827a71609d | |
parent | 7bff7accd427da171501b558457ef8fa81ee2767 (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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 bc784254e78e..407d7f9fe8a8 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, | |||
970 | if (new_backup) | 970 | if (new_backup) |
971 | res->backup_offset = new_backup_offset; | 971 | res->backup_offset = new_backup_offset; |
972 | 972 | ||
973 | if (!res->func->may_evict) | 973 | if (!res->func->may_evict || res->id == -1) |
974 | return; | 974 | return; |
975 | 975 | ||
976 | write_lock(&dev_priv->resource_lock); | 976 | write_lock(&dev_priv->resource_lock); |