1. 11 4月, 2018 21 次提交
  2. 23 2月, 2018 2 次提交
  3. 22 2月, 2018 1 次提交
  4. 01 2月, 2018 1 次提交
  5. 29 1月, 2018 2 次提交
  6. 28 1月, 2018 1 次提交
  7. 26 1月, 2018 2 次提交
  8. 22 1月, 2018 1 次提交
    • E
      NFS: reject request for id_legacy key without auxdata · 49686cbb
      Eric Biggers 提交于
      nfs_idmap_legacy_upcall() is supposed to be called with 'aux' pointing
      to a 'struct idmap', via the call to request_key_with_auxdata() in
      nfs_idmap_request_key().
      
      However it can also be reached via the request_key() system call in
      which case 'aux' will be NULL, causing a NULL pointer dereference in
      nfs_idmap_prepare_pipe_upcall(), assuming that the key description is
      valid enough to get that far.
      
      Fix this by making nfs_idmap_legacy_upcall() negate the key if no
      auxdata is provided.
      
      As usual, this bug was found by syzkaller.  A simple reproducer using
      the command-line keyctl program is:
      
          keyctl request2 id_legacy uid:0 '' @s
      
      Fixes: 57e62324 ("NFS: Store the legacy idmapper result in the keyring")
      Reported-by: syzbot+5dfdbcf7b3eb5912abbb@syzkaller.appspotmail.com
      Cc: <stable@vger.kernel.org> # v3.4+
      Signed-off-by: NEric Biggers <ebiggers@google.com>
      Signed-off-by: NTrond Myklebust <trondmy@gmail.com>
      49686cbb
  9. 19 1月, 2018 3 次提交
  10. 16 1月, 2018 2 次提交
  11. 15 1月, 2018 4 次提交
    • C
      nfs: Update server port after referral or migration · 801b5643
      Chuck Lever 提交于
      After traversing a referral or recovering from a migration event,
      ensure that the server port reported in /proc/mounts is updated
      to the correct port setting for the new submount.
      Reported-by: NHelen Chao <helen.chao@oracle.com>
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      801b5643
    • C
      nfs: Referrals should use the same proto setting as their parent · 530ea421
      Chuck Lever 提交于
      Helen Chao <helen.chao@oracle.com> noticed that when a user
      traverses a referral on an NFS/RDMA mount, the resulting submount
      always uses TCP.
      
      This behavior does not match the vers= setting when traversing
      a referral (vers=4.1 is preserved). It also does not match the
      behavior of crossing from the pseudofs into a real filesystem
      (proto=rdma is preserved in that case).
      
      The Linux NFS client does not currently support the
      fs_locations_info attribute. The situation is similar for all
      NFSv4 servers I know of. Therefore until the community has broad
      support for fs_locations_info, when following a referral:
      
       - First try to connect with RPC-over-RDMA. This will fail quickly
         if the client has no RDMA-capable interfaces.
      
       - If connecting with RPC-over-RDMA fails, or the RPC-over-RDMA
         transport is not available, use TCP.
      Reported-by: NHelen Chao <helen.chao@oracle.com>
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      530ea421
    • S
      nfs/pnfs: fix nfs_direct_req ref leak when i/o falls back to the mds · ba4a76f7
      Scott Mayhew 提交于
      Currently when falling back to doing I/O through the MDS (via
      pnfs_{read|write}_through_mds), the client frees the nfs_pgio_header
      without releasing the reference taken on the dreq
      via pnfs_generic_pg_{read|write}pages -> nfs_pgheader_init ->
      nfs_direct_pgio_init.  It then takes another reference on the dreq via
      nfs_generic_pg_pgios -> nfs_pgheader_init -> nfs_direct_pgio_init and
      as a result the requester will become stuck in inode_dio_wait.  Once
      that happens, other processes accessing the inode will become stuck as
      well.
      
      Ensure that pnfs_read_through_mds() and pnfs_write_through_mds() clean
      up correctly by calling hdr->completion_ops->completion() instead of
      calling hdr->release() directly.
      
      This can be reproduced (sometimes) by performing "storage failover
      takeover" commands on NetApp filer while doing direct I/O from a client.
      
      This can also be reproduced using SystemTap to simulate a failure while
      doing direct I/O from a client (from Dave Wysochanski
      <dwysocha@redhat.com>):
      
      stap -v -g -e 'probe module("nfs_layout_nfsv41_files").function("nfs4_fl_prepare_ds").return { $return=NULL; exit(); }'
      Suggested-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      Signed-off-by: NScott Mayhew <smayhew@redhat.com>
      Fixes: 1ca018d2 ("pNFS: Fix a memory leak when attempted pnfs fails")
      Cc: stable@vger.kernel.org
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      ba4a76f7
    • B
      pnfs/blocklayout: handle transient devices · b3dce6a2
      Benjamin Coddington 提交于
      PNFS block/SCSI layouts should gracefully handle cases where block devices
      are not available when a layout is retrieved, or the block devices are
      removed while the client holds a layout.
      
      While setting up a layout segment, keep a record of an unavailable or
      un-parsable block device in cache with a flag so that subsequent layouts do
      not spam the server with GETDEVINFO.  We can reuse the current
      NFS_DEVICEID_UNAVAILABLE handling with one variation: instead of reusing
      the device, we will discard it and send a fresh GETDEVINFO after the
      timeout, since the lookup and validation of the device occurs within the
      GETDEVINFO response handling.
      
      A lookup of a layout segment that references an unavailable device will
      return a segment with the NFS_LSEG_UNAVAILABLE flag set.  This will allow
      the pgio layer to mark the layout with the appropriate fail bit, which
      forces subsequent IO to the MDS, and prevents spamming the server with
      LAYOUTGET, LAYOUTRETURN.
      
      Finally, when IO to a block device fails, look up the block device(s)
      referenced by the pgio header, and mark them as unavailable.
      Signed-off-by: NBenjamin Coddington <bcodding@redhat.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      b3dce6a2