summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authortruckman <truckman@FreeBSD.org>2002-07-28 21:06:14 +0000
committertruckman <truckman@FreeBSD.org>2002-07-28 21:06:14 +0000
commitdd733c95bcfde1baf969bad58345807c08e8257d (patch)
treedf2d826f50a0e5b2dc5b0895d11b95134c2ba92c /usr.bin
parent0cc69019ed44da3e46f9d2c7adbddd05856f635e (diff)
downloadFreeBSD-src-dd733c95bcfde1baf969bad58345807c08e8257d.zip
FreeBSD-src-dd733c95bcfde1baf969bad58345807c08e8257d.tar.gz
Make a temporary copy of the output data in the generic sysctl handlers
so that the data is less likely to be inconsistent if SYSCTL_OUT() blocks. If the data is large, wire the output buffer instead. This is somewhat less than optimal, since the handler could skip the copy if it knew that the data was static. If the data is dynamic, we are still not guaranteed to get a consistent copy since another processor could change the data while the copy is in progress because the data is not locked. This problem could be solved if the generic handlers had the ability to grab the proper lock before the copy and release it afterwards. This may duplicate work done in other sysctl handlers in the kernel which also copy the data, possibly while a lock is held, before calling they call a generic handler to output the data. These handlers should probably call SYSCTL_OUT() directly.
Diffstat (limited to 'usr.bin')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud