Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/drm Reject drm ioctls through...
details: https://anonhg.NetBSD.org/src/rev/86979e47de64
branches: riastradh-drm2
changeset: 788350:86979e47de64
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 03:22:42 2013 +0000
description:
Reject drm ioctls through control minors unless explicitly allowed.
diffstat:
sys/external/bsd/drm2/drm/drm_drv.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 08d665a890cc -r 86979e47de64 sys/external/bsd/drm2/drm/drm_drv.c
--- a/sys/external/bsd/drm2/drm/drm_drv.c Wed Jul 24 03:22:26 2013 +0000
+++ b/sys/external/bsd/drm2/drm/drm_drv.c Wed Jul 24 03:22:42 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_drv.c,v 1.1.2.8 2013/07/24 03:22:26 riastradh Exp $ */
+/* $NetBSD: drm_drv.c,v 1.1.2.9 2013/07/24 03:22:42 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.1.2.8 2013/07/24 03:22:26 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.1.2.9 2013/07/24 03:22:42 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -531,6 +531,10 @@
if (ISSET(ioctl->flags, DRM_MASTER) && (file->master == NULL))
return EACCES;
+ if (!ISSET(ioctl->flags, DRM_CONTROL_ALLOW) &&
+ (file->minor->type == DRM_MINOR_CONTROL))
+ return EACCES;
+
atomic_inc(&dev->ioctl_count);
if (!ISSET(ioctl->flags, DRM_UNLOCKED))
mutex_lock(&drm_global_mutex);
Home |
Main Index |
Thread Index |
Old Index