1. 24 12月, 2008 1 次提交
  2. 17 5月, 2008 1 次提交
  3. 20 4月, 2008 3 次提交
  4. 20 3月, 2008 1 次提交
    • J
      NFS: clean up short packet handling for NFSv4 readdir · 7bda2cdf
      Jeff Layton 提交于
      Currently, the NFS readdir decoders have a workaround for buggy servers
      that send an empty readdir response with the EOF bit unset. If the
      server sends a malformed response in some cases, this workaround kicks
      in and just returns an empty response rather than returning a proper
      error to the caller.
      
      This patch does 3 things:
      
      1) have malformed responses with no entries return error (-EIO)
      
      2) preserve existing workaround for servers that send empty
         responses with the EOF marker unset.
      
      3) Add some comments to clarify the logic in decode_readdir().
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      7bda2cdf
  5. 15 3月, 2008 1 次提交
  6. 30 1月, 2008 3 次提交
  7. 10 10月, 2007 3 次提交
  8. 20 7月, 2007 6 次提交
  9. 11 7月, 2007 6 次提交
  10. 15 5月, 2007 2 次提交
    • T
      NFS: Fix more sparse warnings · 2e42c3e2
      Trond Myklebust 提交于
       - fs/nfs/nfs4xdr.c:2499:42: warning: incorrect type in argument 2
         (different signedness)
       - fs/nfs/nfs4xdr.c:2658:49: warning: incorrect type in argument 4
         (different explicit signedness)
       - fs/nfs/nfs4xdr.c:2683:50: warning: incorrect type in argument 4
         (different explicit signedness)
       - fs/nfs/nfs4xdr.c:3063:68: warning: incorrect type in argument 4
         (different explicit signedness)
       - fs/nfs/nfs4xdr.c:3065:68: warning: incorrect type in argument 4
         (different explicit signedness)
      
       - fs/nfs/callback_xdr.c:138:31: warning: incorrect type in argument 2
         (different signedness)
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2e42c3e2
    • T
      NFS4: Fix incorrect use of sizeof() in fs/nfs/nfs4xdr.c · 8ae20abd
      Trond Myklebust 提交于
      The XDR code should not depend on the physical allocation size of
      structures like nfs4_stateid and nfs4_verifier since those may have to
      change at some future date. We therefore replace all uses of
      sizeof() with constants like NFS4_VERIFIER_SIZE and NFS4_STATEID_SIZE.
      
      This also has the side-effect of fixing some warnings of the type
      	format ‘%u’ expects type ‘unsigned int’, but argument X has type
      		‘long unsigned int’
      on 64-bit systems
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      8ae20abd
  11. 10 5月, 2007 2 次提交
  12. 01 5月, 2007 1 次提交
    • C
      SUNRPC: RPC buffer size estimates are too large · 2bea90d4
      Chuck Lever 提交于
      The RPC buffer size estimation logic in net/sunrpc/clnt.c always
      significantly overestimates the requirements for the buffer size.
      A little instrumentation demonstrated that in fact rpc_malloc was never
      allocating the buffer from the mempool, but almost always called kmalloc.
      
      To compute the size of the RPC buffer more precisely, split p_bufsiz into
      two fields; one for the argument size, and one for the result size.
      
      Then, compute the sum of the exact call and reply header sizes, and split
      the RPC buffer precisely between the two.  That should keep almost all RPC
      buffers within the 2KiB buffer mempool limit.
      
      And, we can finally be rid of RPC_SLACK_SPACE!
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2bea90d4
  13. 04 2月, 2007 1 次提交
  14. 21 10月, 2006 2 次提交
  15. 23 9月, 2006 4 次提交
  16. 25 8月, 2006 1 次提交
    • D
      NFS: Check lengths more thoroughly in NFS4 readdir XDR decode · e8896495
      David Howells 提交于
      Check the bounds of length specifiers more thoroughly in the XDR decoding of
      NFS4 readdir reply data.
      
      Currently, if the server returns a bitmap or attr length that causes the
      current decode point pointer to wrap, this could go undetected (consider a
      small "negative" length on a 32-bit machine).
      
      Also add a check into the main XDR decode handler to make sure that the amount
      of data is a multiple of four bytes (as specified by RFC-1014).  This makes
      sure that we can do u32* pointer subtraction in the NFS client without risking
      an undefined result (the result is undefined if the pointers are not correctly
      aligned with respect to one another).
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      (cherry picked from 5861fddd64a7eaf7e8b1a9997455a24e7f688092 commit)
      e8896495
  17. 09 6月, 2006 2 次提交