aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_usif.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-11-24 15:34:51 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-11-25 15:31:21 +1000
commitf5e551873e5eaf506b2aa870f56a7ba10a51221b (patch)
tree076c93ceafa81af8d39c864a447778026596dd8a /drivers/gpu/drm/nouveau/nouveau_usif.c
parentdrm/nouveau/gr/gf100-: fix oops when calling zbc methods (diff)
downloadlinux-dev-f5e551873e5eaf506b2aa870f56a7ba10a51221b.tar.xz
linux-dev-f5e551873e5eaf506b2aa870f56a7ba10a51221b.zip
drm/nouveau/nvif: allow userspace access to its own client object
Regression from "abi16: implement limited interoperability with usif/nvif". Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_usif.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_usif.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_usif.c b/drivers/gpu/drm/nouveau/nouveau_usif.c
index 89dc4ce63490..6ae1b3494bcd 100644
--- a/drivers/gpu/drm/nouveau/nouveau_usif.c
+++ b/drivers/gpu/drm/nouveau/nouveau_usif.c
@@ -313,7 +313,10 @@ usif_ioctl(struct drm_file *filp, void __user *user, u32 argc)
if (nvif_unpack(argv->v0, 0, 0, true)) {
/* block access to objects not created via this interface */
owner = argv->v0.owner;
- argv->v0.owner = NVDRM_OBJECT_USIF;
+ if (argv->v0.object == 0ULL)
+ argv->v0.owner = NVDRM_OBJECT_ANY; /* except client */
+ else
+ argv->v0.owner = NVDRM_OBJECT_USIF;
} else
goto done;