Author: kaktus
Date: Sat Feb 15 18:54:59 2020
New Revision: 357973
URL: https://svnweb.freebsd.org/changeset/base/357973

Log:
  Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (2 of many)
  
  r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
  still not MPSAFE (or already are but aren’t properly marked). Use it in
  preparation for a general review of all nodes.
  This is non-functional change that adds annotations to SYSCTL_NODE and
  SYSCTL_PROC nodes using one of the soon-to-be-required flags.
  
  Reviewed by:  hselasky, kib, zeising
  Approved by:  kib (mentor)
  Differential Revision:        https://reviews.freebsd.org/D23631

Modified:
  head/sys/compat/linuxkpi/common/src/linux_compat.c

Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_compat.c  Sat Feb 15 18:52:12 
2020        (r357972)
+++ head/sys/compat/linuxkpi/common/src/linux_compat.c  Sat Feb 15 18:54:59 
2020        (r357973)
@@ -91,7 +91,8 @@ __FBSDID("$FreeBSD$");
 #include <asm/smp.h>
 #endif
 
-SYSCTL_NODE(_compat, OID_AUTO, linuxkpi, CTLFLAG_RW, 0, "LinuxKPI parameters");
+SYSCTL_NODE(_compat, OID_AUTO, linuxkpi, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
+    "LinuxKPI parameters");
 
 int linuxkpi_debug;
 SYSCTL_INT(_compat_linuxkpi, OID_AUTO, debug, CTLFLAG_RWTUN,
@@ -2441,8 +2442,8 @@ linux_compat_init(void *arg)
        kobject_init(&linux_root_device.kobj, &linux_dev_ktype);
        kobject_set_name(&linux_root_device.kobj, "device");
        linux_root_device.kobj.oidp = SYSCTL_ADD_NODE(NULL,
-           SYSCTL_CHILDREN(rootoid), OID_AUTO, "device", CTLFLAG_RD, NULL,
-           "device");
+           SYSCTL_CHILDREN(rootoid), OID_AUTO, "device",
+           CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "device");
        linux_root_device.bsddev = root_bus;
        linux_class_misc.name = "misc";
        class_register(&linux_class_misc);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to