1. 09 2月, 2010 1 次提交
    • J
      Revert "nfsd4: fix error return when pseudoroot missing" · 260c64d2
      J. Bruce Fields 提交于
      Commit f39bde24 fixed the error return from PUTROOTFH in the
      case where there is no pseudofilesystem.
      
      This is really a case we shouldn't hit on a correctly configured server:
      in the absence of a root filehandle, there's no point accepting version
      4 NFS rpc calls at all.
      
      But the shared responsibility between kernel and userspace here means
      the kernel on its own can't eliminate the possiblity of this happening.
      And we have indeed gotten this wrong in distro's, so new client-side
      mount code that attempts to negotiate v4 by default first has to work
      around this case.
      
      Therefore when commit f39bde24 arrived at roughly the same
      time as the new v4-default mount code, which explicitly checked only for
      the previous error, the result was previously fine mounts suddenly
      failing.
      
      We'll fix both sides for now: revert the error change, and make the
      client-side mount workaround more robust.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      260c64d2
  2. 07 1月, 2010 2 次提交
    • X
      sunrpc: fix peername failed on closed listener · b292cf9c
      Xiaotian Feng 提交于
      There're some warnings of "nfsd: peername failed (err 107)!"
      socket error -107 means Transport endpoint is not connected.
      This warning message was outputed by svc_tcp_accept() [net/sunrpc/svcsock.c],
      when kernel_getpeername returns -107. This means socket might be CLOSED.
      
      And svc_tcp_accept was called by svc_recv() [net/sunrpc/svc_xprt.c]
      
              if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) {
              <snip>
                      newxpt = xprt->xpt_ops->xpo_accept(xprt);
              <snip>
      
      So this might happen when xprt->xpt_flags has both XPT_LISTENER and XPT_CLOSE.
      
      Let's take a look at commit b0401d72, this commit has moved the close
      processing after do recvfrom method, but this commit also introduces this
      warnings, if the xpt_flags has both XPT_LISTENER and XPT_CLOSED, we should
      close it, not accpet then close.
      Signed-off-by: NXiaotian Feng <dfeng@redhat.com>
      Cc: J. Bruce Fields <bfields@fieldses.org>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: stable@kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      b292cf9c
    • C
      nfsd: make sure data is on disk before calling ->fsync · 7211a4e8
      Christoph Hellwig 提交于
      nfsd is not using vfs_fsync, so I missed it when changing the calling
      convention during the 2.6.32 window.  This patch fixes it to not only
      start the data writeout, but also wait for it to complete before calling
      into ->fsync.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: stable@kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      7211a4e8
  3. 20 12月, 2009 1 次提交
  4. 16 12月, 2009 11 次提交
  5. 15 12月, 2009 15 次提交
  6. 26 11月, 2009 1 次提交
    • J
      nfsd: simplify fh_verify access checks · 864f0f61
      J. Bruce Fields 提交于
      All nfsd security depends on the security checks in fh_verify, and
      especially on nfsd_setuser().
      
      It therefore bothers me that the nfsd_setuser call may be made from
      three different places, depending on whether the filehandle has already
      been mapped to a dentry, and on whether subtreechecking is in force.
      
      Instead, make an unconditional call in fh_verify(), so it's trivial to
      verify that the call always occurs.
      
      That leaves us with a redundant nfsd_setuser() call in the subtreecheck
      case--it needs the correct user set earlier in order to check execute
      permissions on the path to this filehandle--but I'm willing to accept
      that minor inefficiency in the subtreecheck case in return for more
      straightforward permission checking.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      864f0f61
  7. 24 11月, 2009 2 次提交
  8. 20 11月, 2009 4 次提交
  9. 19 11月, 2009 3 次提交