drm/nouveau: reject attempts to submit to dead channels

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Ben Skeggs 2020-01-23 13:47:12 +10:00
parent 4c9ee1bfca
commit 0181f4bfbd
1 changed files with 2 additions and 0 deletions

View File

@ -702,6 +702,8 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
if (!chan)
return nouveau_abi16_put(abi16, -ENOENT);
if (unlikely(atomic_read(&chan->killed)))
return nouveau_abi16_put(abi16, -ENODEV);
req->vram_available = drm->gem.vram_available;
req->gart_available = drm->gem.gart_available;