From 696e3afd34f296d4a353bbd6660c6ce8c1f32b2d Mon Sep 17 00:00:00 2001 From: mjg Date: Sun, 12 Jan 2020 05:25:06 +0000 Subject: [PATCH] sysctl: add missing CLTFLAG_MPSAFE annotation to CONST_STRING --- sys/sys/sysctl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 7e3e983a7ebf..9075e908d04a 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -357,7 +357,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); /* Oid for a constant '\0' terminated string. */ #define SYSCTL_CONST_STRING(parent, nbr, name, access, arg, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), \ + SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING | CTLFLAG_MPSAFE | (access),\ __DECONST(char *, arg), 0, sysctl_handle_string, "A", descr); \ CTASSERT(!(access & CTLFLAG_WR)); \ CTASSERT(((access) & CTLTYPE) == 0 || \ @@ -369,9 +369,9 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); CTASSERT(!(access & CTLFLAG_WR)); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING); \ - sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_STRING|(access), \ - __arg, 0, sysctl_handle_string, "A", __DESCR(descr), \ - NULL); \ + sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_STRING | \ + CTLFLAG_MPSAFE | (access), __arg, 0, sysctl_handle_string, "A",\ + __DESCR(descr), NULL); \ }) /* Oid for a bool. If ptr is NULL, val is returned. */ -- 2.41.0