]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/nouveau: reject attempts to submit to dead channels
authorBen Skeggs <bskeggs@redhat.com>
Thu, 23 Jan 2020 03:47:12 +0000 (13:47 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 29 Jan 2020 05:49:47 +0000 (15:49 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_gem.c

index 05ec8edd6a8b787213b3c2b4628c4aad33d360a4..8f97534e996c94be5cfaba35eaa2b5f4fac4b279 100644 (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;