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:
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to