mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 06:04:14 +08:00
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>
This commit is contained in:
parent
ebff5fa9d5
commit
26682480c2
@ -970,7 +970,7 @@ void vmw_resource_unreserve(struct vmw_resource *res,
|
|||||||
if (new_backup)
|
if (new_backup)
|
||||||
res->backup_offset = new_backup_offset;
|
res->backup_offset = new_backup_offset;
|
||||||
|
|
||||||
if (!res->func->may_evict)
|
if (!res->func->may_evict || res->id == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
write_lock(&dev_priv->resource_lock);
|
write_lock(&dev_priv->resource_lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user