diff options
author | kib <kib@FreeBSD.org> | 2017-03-26 00:56:24 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2017-03-26 00:56:24 +0000 |
commit | a0233c9d846149b3995ae14d07de5b7b5f3cc465 (patch) | |
tree | 0c27a3335227132fb5aab401c84e28c1181d42ef | |
parent | af77e2e64dc06de81a9adb462bfd11d68bc186cd (diff) | |
download | FreeBSD-src-a0233c9d846149b3995ae14d07de5b7b5f3cc465.zip FreeBSD-src-a0233c9d846149b3995ae14d07de5b7b5f3cc465.tar.gz |
MFC r315588:
Update the list of cpudev ioctls which require write access.
-rw-r--r-- | sys/dev/cpuctl/cpuctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/cpuctl/cpuctl.c b/sys/dev/cpuctl/cpuctl.c index 3278ccc..5351d8ed 100644 --- a/sys/dev/cpuctl/cpuctl.c +++ b/sys/dev/cpuctl/cpuctl.c @@ -156,8 +156,9 @@ cpuctl_ioctl(struct cdev *dev, u_long cmd, caddr_t data, return (ENXIO); } /* Require write flag for "write" requests. */ - if ((cmd == CPUCTL_WRMSR || cmd == CPUCTL_UPDATE) && - ((flags & FWRITE) == 0)) + if ((cmd == CPUCTL_MSRCBIT || cmd == CPUCTL_MSRSBIT || + cmd == CPUCTL_UPDATE || cmd == CPUCTL_WRMSR) && + (flags & FWRITE) == 0) return (EPERM); switch (cmd) { case CPUCTL_RDMSR: |