diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-09-05 09:01:21 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-09-05 09:22:09 +1000 |
commit | 2acc868319ed03c0e4b2f747c104d7e2ec0a841f (patch) | |
tree | c0a77b1322832459eff3bfe40ef4dfabb04cdcf3 | |
parent | 4898ac046d24894d7b2a5a96a1cff4e095844323 (diff) |
drm/nouveau/core: don't leak oclass type bits to user
Fixes not being able to init fence subsystem when multiple boards are
present.
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/core/core/parent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/core/core/parent.c b/drivers/gpu/drm/nouveau/core/core/parent.c index 8701968a9743..30a2911878f8 100644 --- a/drivers/gpu/drm/nouveau/core/core/parent.c +++ b/drivers/gpu/drm/nouveau/core/core/parent.c @@ -86,7 +86,7 @@ nouveau_parent_lclass(struct nouveau_object *parent, u32 *lclass, int size) sclass = nv_parent(parent)->sclass; while (sclass) { if (++nr < size) - lclass[nr] = sclass->oclass->handle; + lclass[nr] = sclass->oclass->handle & 0xffff; sclass = sclass->sclass; } @@ -96,7 +96,7 @@ nouveau_parent_lclass(struct nouveau_object *parent, u32 *lclass, int size) if (engine && (oclass = engine->sclass)) { while (oclass->ofuncs) { if (++nr < size) - lclass[nr] = oclass->handle; + lclass[nr] = oclass->handle & 0xffff; oclass++; } } |