1. 20 12月, 2016 2 次提交
  2. 10 12月, 2016 5 次提交
    • T
      Merge tag 'nfs-rdma-4.10-1' of git://git.linux-nfs.org/projects/anna/nfs-rdma · 2549f307
      Trond Myklebust 提交于
      NFS: NFSoRDMA Client Side Changes
      
      New Features:
      - Support for SG_GAP devices
      
      Bugfixes and cleanups:
      - Cap size of callback buffer resources
      - Improve send queue and RPC metric accounting
      - Fix coverity warning
      - Avoid calls to ro_unmap_safe()
      - Refactor FRMR invalidation
      - Error message improvements
      2549f307
    • N
      SUNRPC: fix refcounting problems with auth_gss messages. · 1cded9d2
      NeilBrown 提交于
      There are two problems with refcounting of auth_gss messages.
      
      First, the reference on the pipe->pipe list (taken by a call
      to rpc_queue_upcall()) is not counted.  It seems to be
      assumed that a message in pipe->pipe will always also be in
      pipe->in_downcall, where it is correctly reference counted.
      
      However there is no guaranty of this.  I have a report of a
      NULL dereferences in rpc_pipe_read() which suggests a msg
      that has been freed is still on the pipe->pipe list.
      
      One way I imagine this might happen is:
      - message is queued for uid=U and auth->service=S1
      - rpc.gssd reads this message and starts processing.
        This removes the message from pipe->pipe
      - message is queued for uid=U and auth->service=S2
      - rpc.gssd replies to the first message. gss_pipe_downcall()
        calls __gss_find_upcall(pipe, U, NULL) and it finds the
        *second* message, as new messages are placed at the head
        of ->in_downcall, and the service type is not checked.
      - This second message is removed from ->in_downcall and freed
        by gss_release_msg() (even though it is still on pipe->pipe)
      - rpc.gssd tries to read another message, and dereferences a pointer
        to this message that has just been freed.
      
      I fix this by incrementing the reference count before calling
      rpc_queue_upcall(), and decrementing it if that fails, or normally in
      gss_pipe_destroy_msg().
      
      It seems strange that the reply doesn't target the message more
      precisely, but I don't know all the details.  In any case, I think the
      reference counting irregularity became a measureable bug when the
      extra arg was added to __gss_find_upcall(), hence the Fixes: line
      below.
      
      The second problem is that if rpc_queue_upcall() fails, the new
      message is not freed. gss_alloc_msg() set the ->count to 1,
      gss_add_msg() increments this to 2, gss_unhash_msg() decrements to 1,
      then the pointer is discarded so the memory never gets freed.
      
      Fixes: 9130b8db ("SUNRPC: allow for upcalls for same uid but different gss service")
      Cc: stable@vger.kernel.org
      Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1011250Signed-off-by: NNeilBrown <neilb@suse.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      1cded9d2
    • A
      nfs: add support for the umask attribute · dff25ddb
      Andreas Gruenbacher 提交于
      Clients can set the umask attribute when creating files to cause the
      server to apply it always except when inheriting permissions from the
      parent directory.  That way, the new files will end up with the same
      permissions as files created locally.
      
      See https://tools.ietf.org/html/draft-ietf-nfsv4-umask-02 for more details.
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      dff25ddb
    • T
      pNFS/flexfiles: Ensure we have enough buffer for layoutreturn · d9152114
      Trond Myklebust 提交于
      The flexfiles client can piggyback both layout errors and layoutstats
      as part of the layoutreturn. Both these payloads can get large, with
      20 layout error entries taking up about 1.2K, and 4 layoutstats entries
      taking up another 1K.
      This patch allows a maximum payload of 4k by allocating a full page.
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      d9152114
    • T
  3. 09 12月, 2016 1 次提交
  4. 08 12月, 2016 3 次提交
  5. 06 12月, 2016 1 次提交
  6. 05 12月, 2016 5 次提交
  7. 04 12月, 2016 6 次提交
  8. 03 12月, 2016 7 次提交
  9. 02 12月, 2016 10 次提交