diff options
author | Don Lewis <truckman@FreeBSD.org> | 2002-07-28 19:59:31 +0000 |
---|---|---|
committer | Don Lewis <truckman@FreeBSD.org> | 2002-07-28 19:59:31 +0000 |
commit | 5c38b6dbce8b0e199cc285982440e9459ad4ffa8 (patch) | |
tree | 6dda6f0898c9f15fca929e63e72b3882862e67e1 /sys/kern/kern_descrip.c | |
parent | b44ba1a844ff3b351139591b8eeff6273e566a45 (diff) | |
download | src-5c38b6dbce8b0e199cc285982440e9459ad4ffa8.tar.gz src-5c38b6dbce8b0e199cc285982440e9459ad4ffa8.zip |
Wire the sysctl output buffer before grabbing any locks to prevent
SYSCTL_OUT() from blocking while locks are held. This should
only be done when it would be inconvenient to make a temporary copy of
the data and defer calling SYSCTL_OUT() until after the locks are
released.
Notes
Notes:
svn path=/head/; revision=100831
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r-- | sys/kern/kern_descrip.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 43a7e448831e..06aca87e677d 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2043,6 +2043,7 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) int error; struct file *fp; + sysctl_wire_old_buffer(req, 0); sx_slock(&filelist_lock); if (!req->oldptr) { /* |