cvs commit: src/sys/kern kern_sysctl.c
Don Lewis
truckman at FreeBSD.org
Mon Mar 15 17:28:46 PST 2004
truckman 2004/03/15 17:28:45 PST
FreeBSD src repository
Modified files:
sys/kern kern_sysctl.c
Log:
Don't bother calling vslock() and vsunlock() if oldlen is zero.
If vslock() returns ENOMEM, sysctl_wire_old_buffer() should set
wiredlen to zero and return zero (success) so that the handler will
operate according to sysctl(3):
The size of the buffer is given by the location specified by
oldlenp before the call, and that location gives the amount
of data copied after a successful call and after a call that
returns with the error code ENOMEM.
The handler will return an ENOMEM error because the zero length
buffer will overflow.
Revision Changes Path
1.154 +9 -7 src/sys/kern/kern_sysctl.c
More information about the cvs-src
mailing list