1. 21 8月, 2009 3 次提交
  2. 15 8月, 2009 2 次提交
  3. 10 8月, 2009 12 次提交
  4. 15 7月, 2009 1 次提交
    • A
      nfsd41: use globals for DRC limits · 4bd9b0f4
      Andy Adamson 提交于
      The version 4.1 DRC memory limit and tracking variables are server wide and
      session specific. Replace struct svc_serv fields with globals.
      Stop using the svc_serv sv_lock.
      
      Add a spinlock to serialize access to the DRC limit management variables which
      change on session creation and deletion (usage counter) or (future)
      administrative action to adjust the total DRC memory limit.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      4bd9b0f4
  5. 13 7月, 2009 1 次提交
  6. 18 6月, 2009 10 次提交
  7. 03 5月, 2009 1 次提交
  8. 29 4月, 2009 4 次提交
    • C
      SUNRPC: pass buffer size to svc_sock_names() · 8435d34d
      Chuck Lever 提交于
      Adjust the synopsis of svc_sock_names() to pass in the size of the
      output buffer.  Add a documenting comment.
      
      This is a cosmetic change for now.  A subsequent patch will make sure
      the buffer length is passed to one_sock_name(), where the length will
      actually be useful.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      8435d34d
    • C
      SUNRPC: pass buffer size to svc_addsock() · bfba9ab4
      Chuck Lever 提交于
      Adjust the synopsis of svc_addsock() to pass in the size of the output
      buffer.  Add a documenting comment.
      
      This is a cosmetic change for now.  A subsequent patch will make sure
      the buffer length is passed to one_sock_name(), where the length will
      actually be useful.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      bfba9ab4
    • C
      NFSD: Prevent a buffer overflow in svc_xprt_names() · 335c54bd
      Chuck Lever 提交于
      The svc_xprt_names() function can overflow its buffer if it's so near
      the end of the passed in buffer that the "name too long" string still
      doesn't fit.  Of course, it could never tell if it was near the end
      of the passed in buffer, since its only caller passes in zero as the
      buffer length.
      
      Let's make this API a little safer.
      
      Change svc_xprt_names() so it *always* checks for a buffer overflow,
      and change its only caller to pass in the correct buffer length.
      
      If svc_xprt_names() does overflow its buffer, it now fails with an
      ENAMETOOLONG errno, instead of trying to write a message at the end
      of the buffer.  I don't like this much, but I can't figure out a clean
      way that's always safe to return some of the names, *and* an
      indication that the buffer was not long enough.
      
      The displayed error when doing a 'cat /proc/fs/nfsd/portlist' is
      "File name too long".
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      335c54bd
    • C
      SUNRPC: Fix error return value of svc_addr_len() · abc5c44d
      Chuck Lever 提交于
      The svc_addr_len() helper function returns -EAFNOSUPPORT if it doesn't
      recognize the address family of the passed-in socket address.  However,
      the return type of this function is size_t, which means -EAFNOSUPPORT
      is turned into a very large positive value in this case.
      
      The check in svc_udp_recvfrom() to see if the return value is less
      than zero therefore won't work at all.
      
      Additionally, handle_connect_req() passes this value directly to
      memset().  This could cause memset() to clobber a large chunk of memory
      if svc_addr_len() has returned an error.  Currently the address family
      of these addresses, however, is known to be supported long before
      handle_connect_req() is called, so this isn't a real risk.
      
      Change the error return value of svc_addr_len() to zero, which fits in
      the range of size_t, and is safer to pass to memset() directly.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      abc5c44d
  9. 04 4月, 2009 2 次提交
  10. 29 3月, 2009 4 次提交