summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcsjp <csjp@FreeBSD.org>2005-08-08 21:06:42 +0000
committercsjp <csjp@FreeBSD.org>2005-08-08 21:06:42 +0000
commitcbebbd770468d95bef92d14533444145eabc21a8 (patch)
tree65df573c80a2fd388c7a026a6a788fb552691bbb
parentba589db4851a78d7a0fdfc6e4a6a79496a2b3341 (diff)
downloadFreeBSD-src-cbebbd770468d95bef92d14533444145eabc21a8.zip
FreeBSD-src-cbebbd770468d95bef92d14533444145eabc21a8.tar.gz
Drop in a WITNESS_WARN into SYSCTL_IN to make sure that we are
not holding any non-sleep-able-locks locks when copyin is called. This gets executed un-conditionally since we have no function to wire the buffer in this direction. Pointed out by: truckman MFC after: 1 week
-rw-r--r--sys/kern/kern_sysctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 31482f8..6a64a1a 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1099,6 +1099,8 @@ sysctl_new_user(struct sysctl_req *req, void *p, size_t l)
return (0);
if (req->newlen - req->newidx < l)
return (EINVAL);
+ WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,
+ "sysctl_new_user()");
error = copyin((char *)req->newptr + req->newidx, p, l);
req->newidx += l;
return (error);
OpenPOWER on IntegriCloud