git: 967e9ddfb839 - stable/13 - krpc: Replace !jailed() with IS_DEFAULT_VNET()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 17 May 2023 22:18:16 UTC
The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=967e9ddfb83936386870b5533f31b875be574929 commit 967e9ddfb83936386870b5533f31b875be574929 Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2023-02-16 22:32:50 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2023-05-17 22:17:22 +0000 krpc: Replace !jailed() with IS_DEFAULT_VNET() Since svcpool_create() is now called from an initialization function, !jailed() no longer works. Replace it with IS_DEFAULT_VNET(). (cherry picked from commit 780bae23b8e6c386e4b2f971eb27fa3bd1a6edd1) --- sys/rpc/svc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/rpc/svc.c b/sys/rpc/svc.c index 065da0cc23a4..0b07d2751f4a 100644 --- a/sys/rpc/svc.c +++ b/sys/rpc/svc.c @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); */ #include <sys/param.h> -#include <sys/jail.h> #include <sys/lock.h> #include <sys/kernel.h> #include <sys/kthread.h> @@ -63,6 +62,8 @@ __FBSDID("$FreeBSD$"); #include <sys/sx.h> #include <sys/ucred.h> +#include <net/vnet.h> + #include <rpc/rpc.h> #include <rpc/rpcb_clnt.h> #include <rpc/replay.h> @@ -127,7 +128,7 @@ svcpool_create(const char *name, struct sysctl_oid_list *sysctl_base) pool->sp_space_low = (pool->sp_space_high / 3) * 2; sysctl_ctx_init(&pool->sp_sysctl); - if (!jailed(curthread->td_ucred) && sysctl_base) { + if (IS_DEFAULT_VNET(curvnet) && sysctl_base) { SYSCTL_ADD_PROC(&pool->sp_sysctl, sysctl_base, OID_AUTO, "minthreads", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, pool, 0, svcpool_minthread_sysctl, "I",