Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Mar 2004 17:28:45 -0800 (PST)
From:      Don Lewis <truckman@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern kern_sysctl.c
Message-ID:  <200403160128.i2G1Sjq8048930@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403160128.i2G1Sjq8048930>