Commit f5e55187 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/nvif: allow userspace access to its own client object

Regression from "abi16: implement limited interoperability with
usif/nvif".
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 0d7fc246
......@@ -39,6 +39,7 @@
#include <nvif/client.h>
#include <nvif/device.h>
#include <nvif/ioctl.h>
#include <drmP.h>
......@@ -65,9 +66,10 @@ struct nouveau_drm_tile {
};
enum nouveau_drm_object_route {
NVDRM_OBJECT_NVIF = 0,
NVDRM_OBJECT_NVIF = NVIF_IOCTL_V0_OWNER_NVIF,
NVDRM_OBJECT_USIF,
NVDRM_OBJECT_ABI16,
NVDRM_OBJECT_ANY = NVIF_IOCTL_V0_OWNER_ANY,
};
enum nouveau_drm_notify_route {
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment