diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2018-02-19 08:59:54 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2018-02-19 08:59:54 +0000 |
commit | f44ff454cd0da5e1133d8f57877628c13d346dc5 (patch) | |
tree | a859411ce3744fe07063c4159a939baca3f01e49 /sys/dev/pci | |
parent | 4272ed38eae20e0ca38fa48ddd2fcc64c78d02ec (diff) |
Remove almost unused `flags' argument of suser().
The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.
No objection from millert@, ok tedu@, bluhm@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/cz.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/drmP.h | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/drm_linux.h | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/pci/cz.c b/sys/dev/pci/cz.c index 3703e6aabff..a9fb72c8c71 100644 --- a/sys/dev/pci/cz.c +++ b/sys/dev/pci/cz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cz.c,v 1.20 2014/07/13 23:10:23 deraadt Exp $ */ +/* $OpenBSD: cz.c,v 1.21 2018/02/19 08:59:52 mpi Exp $ */ /* $NetBSD: cz.c,v 1.15 2001/01/20 19:10:36 thorpej Exp $ */ /*- @@ -964,7 +964,7 @@ czttyopen(dev_t dev, int flags, int mode, struct proc *p) if (ISSET(tp->t_state, TS_ISOPEN) && ISSET(tp->t_state, TS_XCLUDE) && - suser(p, 0) != 0) + suser(p) != 0) return (EBUSY); s = spltty(); @@ -1171,7 +1171,7 @@ czttyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) break; case TIOCSFLAGS: - error = suser(p, 0); + error = suser(p); if (error) break; sc->sc_swflags = *(int *)data; diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h index 78e9f97bc26..8ed45e3a470 100644 --- a/sys/dev/pci/drm/drmP.h +++ b/sys/dev/pci/drm/drmP.h @@ -1,4 +1,4 @@ -/* $OpenBSD: drmP.h,v 1.216 2018/01/13 13:03:42 robert Exp $ */ +/* $OpenBSD: drmP.h,v 1.217 2018/02/19 08:59:52 mpi Exp $ */ /* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*- * Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com */ @@ -117,7 +117,7 @@ struct fb_image; #define DRM_MAXUNITS 8 /* DRM_SUSER returns true if the user is superuser */ -#define DRM_SUSER(p) (suser(p, 0) == 0) +#define DRM_SUSER(p) (suser(p) == 0) #define DRM_MTRR_WC MDF_WRITECOMBINE #define DRM_WAKEUP(x) wakeup(x) diff --git a/sys/dev/pci/drm/drm_linux.h b/sys/dev/pci/drm/drm_linux.h index 4953842f3ac..89749ddb2c6 100644 --- a/sys/dev/pci/drm/drm_linux.h +++ b/sys/dev/pci/drm/drm_linux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.h,v 1.83 2018/01/31 10:17:22 jsg Exp $ */ +/* $OpenBSD: drm_linux.h,v 1.84 2018/02/19 08:59:52 mpi Exp $ */ /* * Copyright (c) 2013, 2014, 2015 Mark Kettenis * Copyright (c) 2017 Martin Pieuchot @@ -1773,7 +1773,7 @@ static inline int capable(int cap) { KASSERT(cap == CAP_SYS_ADMIN); - return suser(curproc, 0); + return suser(curproc); } typedef int pgprot_t; |