diff options
author | zec <zec@FreeBSD.org> | 2008-11-26 22:32:07 +0000 |
---|---|---|
committer | zec <zec@FreeBSD.org> | 2008-11-26 22:32:07 +0000 |
commit | 95a15f5c8435d206ae030c1ed698f4fca6afdeae (patch) | |
tree | 92dfba43d59635c80de0299501512e8472dbe130 /sys/kern/kern_sysctl.c | |
parent | 7beb3e535d23cc0fe9278167a9c3dc67220250fd (diff) | |
download | FreeBSD-src-95a15f5c8435d206ae030c1ed698f4fca6afdeae.zip FreeBSD-src-95a15f5c8435d206ae030c1ed698f4fca6afdeae.tar.gz |
Merge more of currently non-functional (i.e. resolving to
whitespace) macros from p4/vimage branch.
Do a better job at enclosing all instantiations of globals
scheduled for virtualization in #ifdef VIMAGE_GLOBALS blocks.
De-virtualize and mark as const saorder_state_alive and
saorder_state_any arrays from ipsec code, given that they are never
updated at runtime, so virtualizing them would be pointless.
Reviewed by: bz, julian
Approved by: julian (mentor)
Obtained from: //depot/projects/vimage-commit2/...
X-MFC after: never
Sponsored by: NLnet Foundation, The FreeBSD Foundation
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r-- | sys/kern/kern_sysctl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index d71c746..5d79ca2 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mutex.h> #include <sys/sx.h> #include <sys/sysproto.h> +#include <sys/vimage.h> #include <security/mac/mac_framework.h> @@ -1413,6 +1414,7 @@ userland_sysctl(struct thread *td, int *name, u_int namelen, void *old, req.lock = REQ_LOCKED; SYSCTL_LOCK(); + CURVNET_SET(TD_TO_VNET(curthread)); do { req.oldidx = 0; @@ -1423,6 +1425,7 @@ userland_sysctl(struct thread *td, int *name, u_int namelen, void *old, if (req.lock == REQ_WIRED && req.validlen > 0) vsunlock(req.oldptr, req.validlen); + CURVNET_RESTORE(); SYSCTL_UNLOCK(); if (error && error != ENOMEM) |