git: a20522d9ae20 - stable/13 - sysctl: Don't pass CTLFLAG_MPSAFE to SYSCTL_STRING

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Thu, 11 Jan 2024 14:35:24 UTC
The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=a20522d9ae20610bd266c99dab75f58d7b3ee22b

commit a20522d9ae20610bd266c99dab75f58d7b3ee22b
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-01-04 13:33:05 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-01-11 14:33:17 +0000

    sysctl: Don't pass CTLFLAG_MPSAFE to SYSCTL_STRING
    
    It is redundant.  No functional change intended.
    
    MFC after:      1 week
    
    (cherry picked from commit 969fc091343e593f15f0f3326f65292b435423d5)
---
 sys/kern/kern_mib.c    | 16 ++++++++--------
 sys/x86/x86/identcpu.c |  4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c
index 37b7b46c87a2..c9056503925f 100644
--- a/sys/kern/kern_mib.c
+++ b/sys/kern/kern_mib.c
@@ -94,20 +94,20 @@ SYSCTL_ROOT_NODE(OID_AUTO, regression, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
     "Regression test MIB");
 #endif
 
-SYSCTL_STRING(_kern, OID_AUTO, ident, CTLFLAG_RD|CTLFLAG_MPSAFE,
+SYSCTL_STRING(_kern, OID_AUTO, ident, CTLFLAG_RD,
     kern_ident, 0, "Kernel identifier");
 
-SYSCTL_INT(_kern, KERN_OSREV, osrevision, CTLFLAG_RD|CTLFLAG_CAPRD,
+SYSCTL_INT(_kern, KERN_OSREV, osrevision, CTLFLAG_RD | CTLFLAG_CAPRD,
     SYSCTL_NULL_INT_PTR, BSD, "Operating system revision");
 
-SYSCTL_STRING(_kern, KERN_VERSION, version, CTLFLAG_RD|CTLFLAG_MPSAFE,
+SYSCTL_STRING(_kern, KERN_VERSION, version, CTLFLAG_RD,
     version, 0, "Kernel version");
 
-SYSCTL_STRING(_kern, OID_AUTO, compiler_version, CTLFLAG_RD|CTLFLAG_MPSAFE,
+SYSCTL_STRING(_kern, OID_AUTO, compiler_version, CTLFLAG_RD,
     compiler_version, 0, "Version of compiler used to compile kernel");
 
-SYSCTL_STRING(_kern, KERN_OSTYPE, ostype, CTLFLAG_RD|CTLFLAG_MPSAFE|
-    CTLFLAG_CAPRD, ostype, 0, "Operating system type");
+SYSCTL_STRING(_kern, KERN_OSTYPE, ostype, CTLFLAG_RD | CTLFLAG_CAPRD,
+    ostype, 0, "Operating system type");
 
 SYSCTL_INT(_kern, KERN_MAXPROC, maxproc, CTLFLAG_RDTUN | CTLFLAG_NOFETCH,
     &maxproc, 0, "Maximum number of processes");
@@ -141,7 +141,7 @@ SYSCTL_INT(_kern, KERN_SAVED_IDS, saved_ids, CTLFLAG_RD|CTLFLAG_CAPRD,
 
 char kernelname[MAXPATHLEN] = PATH_KERNEL;	/* XXX bloat */
 
-SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW | CTLFLAG_MPSAFE,
+SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW,
     kernelname, sizeof kernelname, "Name of kernel file booted");
 
 #ifdef COMPAT_FREEBSD12
@@ -449,7 +449,7 @@ SYSCTL_PROC(_kern, KERN_SECURELVL, securelevel,
 /* Actual kernel configuration options. */
 extern char kernconfstring[];
 
-SYSCTL_STRING(_kern, OID_AUTO, conftxt, CTLFLAG_RD | CTLFLAG_MPSAFE,
+SYSCTL_STRING(_kern, OID_AUTO, conftxt, CTLFLAG_RD,
     kernconfstring, 0, "Kernel configuration file");
 #endif
 
diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c
index 92a88ede5f79..1eb6bd6cac6f 100644
--- a/sys/x86/x86/identcpu.c
+++ b/sys/x86/x86/identcpu.c
@@ -158,7 +158,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD,
 #endif
 
 char cpu_model[128];
-SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD | CTLFLAG_MPSAFE,
+SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD,
     cpu_model, 0, "Machine model");
 
 static int hw_clockrate;
@@ -168,7 +168,7 @@ SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD,
 u_int hv_base;
 u_int hv_high;
 char hv_vendor[16];
-SYSCTL_STRING(_hw, OID_AUTO, hv_vendor, CTLFLAG_RD | CTLFLAG_MPSAFE, hv_vendor,
+SYSCTL_STRING(_hw, OID_AUTO, hv_vendor, CTLFLAG_RD, hv_vendor,
     0, "Hypervisor vendor");
 
 static eventhandler_tag tsc_post_tag;