summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2014-03-21 19:12:05 +0000
committermjg <mjg@FreeBSD.org>2014-03-21 19:12:05 +0000
commitdf8e97fc8b389a343721dbd7f227ed43f43a0038 (patch)
tree63802b92d8dfbfb4d6900539e71dc00dd9ff6aad
parent7390415c588f555cd61255270cf8cb591d0211b7 (diff)
downloadFreeBSD-src-df8e97fc8b389a343721dbd7f227ed43f43a0038.zip
FreeBSD-src-df8e97fc8b389a343721dbd7f227ed43f43a0038.tar.gz
Mark the following sysctls as MPSAFE:
kern.file kern.proc.filedesc kern.proc.ofiledesc MFC after: 7 days
-rw-r--r--sys/kern/kern_descrip.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 0a9e2f9..09d748f 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -2975,7 +2975,7 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS)
return (error);
}
-SYSCTL_PROC(_kern, KERN_FILE, file, CTLTYPE_OPAQUE|CTLFLAG_RD,
+SYSCTL_PROC(_kern, KERN_FILE, file, CTLTYPE_OPAQUE|CTLFLAG_RD|CTLFLAG_MPSAFE,
0, 0, sysctl_kern_file, "S,xfile", "Entire file table");
#ifdef KINFO_OFILE_SIZE
@@ -3231,8 +3231,9 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS)
return (0);
}
-static SYSCTL_NODE(_kern_proc, KERN_PROC_OFILEDESC, ofiledesc, CTLFLAG_RD,
- sysctl_kern_proc_ofiledesc, "Process ofiledesc entries");
+static SYSCTL_NODE(_kern_proc, KERN_PROC_OFILEDESC, ofiledesc,
+ CTLFLAG_RD||CTLFLAG_MPSAFE, sysctl_kern_proc_ofiledesc,
+ "Process ofiledesc entries");
#endif /* COMPAT_FREEBSD7 */
#ifdef KINFO_FILE_SIZE
@@ -3742,8 +3743,9 @@ fill_shm_info(struct file *fp, struct kinfo_file *kif)
return (0);
}
-static SYSCTL_NODE(_kern_proc, KERN_PROC_FILEDESC, filedesc, CTLFLAG_RD,
- sysctl_kern_proc_filedesc, "Process filedesc entries");
+static SYSCTL_NODE(_kern_proc, KERN_PROC_FILEDESC, filedesc,
+ CTLFLAG_RD|CTLFLAG_MPSAFE, sysctl_kern_proc_filedesc,
+ "Process filedesc entries");
#ifdef DDB
/*
OpenPOWER on IntegriCloud