summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2008-12-19 16:08:40 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2008-12-19 16:08:40 +0000
commit2baf651277848bc6b05fb93e87662c383f029551 (patch)
treead5672545ea00111926f70a854bf021057a98bd7
parent01a0e4ea1a78bf4c583a9e6a42355b333ee99c18 (diff)
Notes
-rw-r--r--sys/kern/kern_sysctl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index dc64f31b88fd..9c23cc6646d1 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/uio.h>
#include <security/mac/mac_framework.h>
@@ -1395,11 +1396,14 @@ userland_sysctl(struct thread *td, int *name, u_int namelen, void *old,
SYSCTL_LOCK();
- do {
+ for (;;) {
req.oldidx = 0;
req.newidx = 0;
error = sysctl_root(0, name, namelen, &req);
- } while (error == EAGAIN);
+ if (error != EAGAIN)
+ break;
+ uio_yield();
+ }
if (req.lock == REQ_WIRED && req.validlen > 0)
vsunlock(req.oldptr, req.validlen);