From owner-svn-src-head@freebsd.org  Sat Feb 15 18:54:59 2020
Return-Path: <owner-svn-src-head@freebsd.org>
Delivered-To: svn-src-head@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1BF824441F;
 Sat, 15 Feb 2020 18:54:59 +0000 (UTC)
 (envelope-from kaktus@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 48KfZC67Cpz4bT2;
 Sat, 15 Feb 2020 18:54:59 +0000 (UTC)
 (envelope-from kaktus@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDA401973A;
 Sat, 15 Feb 2020 18:54:59 +0000 (UTC)
 (envelope-from kaktus@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01FIsxtI074807;
 Sat, 15 Feb 2020 18:54:59 GMT (envelope-from kaktus@FreeBSD.org)
Received: (from kaktus@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FIsxoh074806;
 Sat, 15 Feb 2020 18:54:59 GMT (envelope-from kaktus@FreeBSD.org)
Message-Id: <202002151854.01FIsxoh074806@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kaktus set sender to
 kaktus@FreeBSD.org using -f
From: Pawel Biernacki <kaktus@FreeBSD.org>
Date: Sat, 15 Feb 2020 18:54:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r357973 - head/sys/compat/linuxkpi/common/src
X-SVN-Group: head
X-SVN-Commit-Author: kaktus
X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src
X-SVN-Commit-Revision: 357973
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 <svn-src-head.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>,
 <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/>
List-Post: <mailto:svn-src-head@freebsd.org>
List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>,
 <mailto:svn-src-head-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 15 Feb 2020 18:55:00 -0000

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);