svn commit: r315588 - head/sys/dev/cpuctl
Konstantin Belousov
kib at FreeBSD.org
Sun Mar 19 21:25:29 UTC 2017
Author: kib
Date: Sun Mar 19 21:25:27 2017
New Revision: 315588
URL: https://svnweb.freebsd.org/changeset/base/315588
Log:
Update the list of cpudev ioctls which require write access.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Modified:
head/sys/dev/cpuctl/cpuctl.c
Modified: head/sys/dev/cpuctl/cpuctl.c
==============================================================================
--- head/sys/dev/cpuctl/cpuctl.c Sun Mar 19 21:25:13 2017 (r315587)
+++ head/sys/dev/cpuctl/cpuctl.c Sun Mar 19 21:25:27 2017 (r315588)
@@ -156,8 +156,9 @@ cpuctl_ioctl(struct cdev *dev, u_long cm
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:
More information about the svn-src-head
mailing list