git: 780bae23b8e6 - main - krpc: Replace !jailed() with IS_DEFAULT_VNET()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Feb 2023 22:34:11 UTC
The branch main has been updated by rmacklem:
URL: https://cgit.FreeBSD.org/src/commit/?id=780bae23b8e6c386e4b2f971eb27fa3bd1a6edd1
commit 780bae23b8e6c386e4b2f971eb27fa3bd1a6edd1
Author: Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2023-02-16 22:32:50 +0000
Commit: Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2023-02-16 22:32:50 +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().
MFC after: 3 months
---
sys/rpc/svc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/rpc/svc.c b/sys/rpc/svc.c
index 065da0cc23a4..5ebf1f5a48b3 100644
--- a/sys/rpc/svc.c
+++ b/sys/rpc/svc.c
@@ -127,7 +127,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",