svn commit: r315972 - stable/10/sys/dev/cpuctl
Konstantin Belousov
kib at FreeBSD.org
Sun Mar 26 01:11:00 UTC 2017
Author: kib
Date: Sun Mar 26 01:10:59 2017
New Revision: 315972
URL: https://svnweb.freebsd.org/changeset/base/315972
Log:
MFC r315588:
Update the list of cpudev ioctls which require write access.
Modified:
stable/10/sys/dev/cpuctl/cpuctl.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/cpuctl/cpuctl.c
==============================================================================
--- stable/10/sys/dev/cpuctl/cpuctl.c Sun Mar 26 00:59:15 2017 (r315971)
+++ stable/10/sys/dev/cpuctl/cpuctl.c Sun Mar 26 01:10:59 2017 (r315972)
@@ -155,8 +155,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-stable
mailing list