1. 26 4月, 2017 8 次提交
    • C
      xprtrdma: Restore transport after device removal · a9b0e381
      Chuck Lever 提交于
      After a device removal, enable the transport connect worker to
      restore normal operation if there is another device with
      connectivity to the server.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      a9b0e381
    • C
      xprtrdma: Refactor rpcrdma_ep_connect · 1890896b
      Chuck Lever 提交于
      I'm about to add another arm to
      
          if (ep->rep_connected != 0)
      
      It will be cleaner to use a switch statement here. We'll be looking
      for a couple of specific errnos, or "anything else," basically to
      sort out the difference between a normal reconnect and recovery from
      device removal.
      
      This is a refactoring change only.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      1890896b
    • C
      xprtrdma: Support unplugging an HCA from under an NFS mount · bebd0318
      Chuck Lever 提交于
      The device driver for the underlying physical device associated
      with an RPC-over-RDMA transport can be removed while RPC-over-RDMA
      transports are still in use (ie, while NFS filesystems are still
      mounted and active). The IB core performs a connection event upcall
      to request that consumers free all RDMA resources associated with
      a transport.
      
      There may be pending RPCs when this occurs. Care must be taken to
      release associated resources without leaving references that can
      trigger a subsequent crash if a signal or soft timeout occurs. We
      rely on the caller of the transport's ->close method to ensure that
      the previous RPC task has invoked xprt_release but the transport
      remains write-locked.
      
      A DEVICE_REMOVE upcall forces a disconnect then sleeps. When ->close
      is invoked, it destroys the transport's H/W resources, then wakes
      the upcall, which completes and allows the core driver unload to
      continue.
      
      BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=266Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      bebd0318
    • C
      xprtrdma: Use same device when mapping or syncing DMA buffers · 91a10c52
      Chuck Lever 提交于
      When the underlying device driver is reloaded, ia->ri_device will be
      replaced. All cached copies of that device pointer have to be
      updated as well.
      
      Commit 54cbd6b0 ("xprtrdma: Delay DMA mapping Send and Receive
      buffers") added the rg_device field to each regbuf. As part of
      handling a device removal, rpcrdma_dma_unmap_regbuf is invoked on
      all regbufs for a transport.
      
      Simply calling rpcrdma_dma_map_regbuf for each Receive buffer after
      the driver has been reloaded should reinitialize rg_device correctly
      for every case except rpcrdma_wc_receive, which still uses
      rpcrdma_rep::rr_device.
      
      Ensure the same device that was used to map a Receive buffer is also
      used to sync it in rpcrdma_wc_receive by using rg_device there
      instead of rr_device.
      
      This is the only use of rr_device, so it can be removed.
      
      The use of regbufs in the send path is also updated, for
      completeness.
      
      Fixes: 54cbd6b0 ("xprtrdma: Delay DMA mapping Send and ... ")
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      91a10c52
    • C
      xprtrdma: Refactor rpcrdma_ia_open() · fff09594
      Chuck Lever 提交于
      In order to unload a device driver and reload it, xprtrdma will need
      to close a transport's interface adapter, and then call
      rpcrdma_ia_open again, possibly finding a different interface
      adapter.
      
      Make rpcrdma_ia_open safe to call on the same transport multiple
      times.
      
      This is a refactoring change only.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      fff09594
    • C
      xprtrdma: Detect unreachable NFS/RDMA servers more reliably · 33849792
      Chuck Lever 提交于
      Current NFS clients rely on connection loss to determine when to
      retransmit. In particular, for protocols like NFSv4, clients no
      longer rely on RPC timeouts to drive retransmission: NFSv4 servers
      are required to terminate a connection when they need a client to
      retransmit pending RPCs.
      
      When a server is no longer reachable, either because it has crashed
      or because the network path has broken, the server cannot actively
      terminate a connection. Thus NFS clients depend on transport-level
      keepalive to determine when a connection must be replaced and
      pending RPCs retransmitted.
      
      However, RDMA RC connections do not have a native keepalive
      mechanism. If an NFS/RDMA server crashes after a client has sent
      RPCs successfully (an RC ACK has been received for all OTW RDMA
      requests), there is no way for the client to know the connection is
      moribund.
      
      In addition, new RDMA requests are subject to the RPC-over-RDMA
      credit limit. If the client has consumed all granted credits with
      NFS traffic, it is not allowed to send another RDMA request until
      the server replies. Thus it has no way to send a true keepalive when
      the workload has already consumed all credits with pending RPCs.
      
      To address this, forcibly disconnect a transport when an RPC times
      out. This prevents moribund connections from stopping the
      detection of failover or other configuration changes on the server.
      
      Note that even if the connection is still good, retransmitting
      any RPC will trigger a disconnect thanks to this logic in
      xprt_rdma_send_request:
      
      	/* Must suppress retransmit to maintain credits */
      	if (req->rl_connect_cookie == xprt->connect_cookie)
      		goto drop_connection;
      	req->rl_connect_cookie = xprt->connect_cookie;
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      33849792
    • C
      sunrpc: Export xprt_force_disconnect() · e2a4f4fb
      Chuck Lever 提交于
      xprt_force_disconnect() is already invoked from the socket
      transport. I want to invoke xprt_force_disconnect() from the
      RPC-over-RDMA transport, which is a separate module from sunrpc.ko.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      e2a4f4fb
    • C
      xprtrdma: Cancel refresh worker during buffer shutdown · 9378b274
      Chuck Lever 提交于
      Trying to create MRs while the transport is being torn down can
      cause a crash.
      
      Fixes: e2ac236c ("xprtrdma: Allocate MRs on demand")
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      9378b274
  2. 10 4月, 2017 5 次提交
    • L
      Linux 4.11-rc6 · 39da7c50
      Linus Torvalds 提交于
      39da7c50
    • L
      Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 · 84ced7fd
      Linus Torvalds 提交于
      Pull CIFS fixes from Steve French:
       "This is a set of CIFS/SMB3 fixes for stable.
      
        There is another set of four SMB3 reconnect fixes for stable in
        progress but they are still being reviewed/tested, so didn't want to
        wait any longer to send these five below"
      
      * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
        Reset TreeId to zero on SMB2 TREE_CONNECT
        CIFS: Fix build failure with smb2
        Introduce cifs_copy_file_range()
        SMB3: Rename clone_range to copychunk_range
        Handle mismatched open calls
      84ced7fd
    • L
      Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm · 462e9a35
      Linus Torvalds 提交于
      Pull ARM fixes from Russell King:
       "A number of ARM fixes:
      
         - prevent oopses caused by dma_get_sgtable() and declared DMA
           coherent memory
      
         - fix boot failure on nommu caused by ID_PFR1 access
      
         - a number of kprobes fixes from Jon Medhurst and Masami Hiramatsu"
      
      * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: 8665/1: nommu: access ID_PFR1 only if CPUID scheme
        ARM: dma-mapping: disallow dma_get_sgtable() for non-kernel managed memory
        arm: kprobes: Align stack to 8-bytes in test code
        arm: kprobes: Fix the return address of multiple kretprobes
        arm: kprobes: Skip single-stepping in recursing path if possible
        arm: kprobes: Allow to handle reentered kprobe on single-stepping
      462e9a35
    • L
      Merge tag 'driver-core-4.11-rc6' of... · 5b50be74
      Linus Torvalds 提交于
      Merge tag 'driver-core-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core fixes from Greg KH:
       "Here are 3 small fixes for 4.11-rc6.
      
        One resolves a reported issue with sysfs files that NeilBrown found,
        one is a documenatation fix for the stable kernel rules, and the last
        is a small MAINTAINERS file update for kernfs"
      
      * tag 'driver-core-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        MAINTAINERS: separate out kernfs maintainership
        sysfs: be careful of error returns from ops->show()
        Documentation: stable-kernel-rules: fix stable-tag format
      5b50be74
    • L
      Merge tag 'staging-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 62e1fd08
      Linus Torvalds 提交于
      Pull staging/IIO driver rfixes from Greg KH:
       "Here are a number of small IIO and staging driver fixes for 4.11-rc6.
        Nothing big here, just iio fixes for reported issues, and an ashmem
        fix for a very old bug that has been reported by a number of Android
        vendors"
      
      * tag 'staging-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: android: ashmem: lseek failed due to no FMODE_LSEEK.
        iio: hid-sensor-attributes: Fix sensor property setting failure.
        iio: accel: hid-sensor-accel-3d: Fix duplicate scan index error
        iio: core: Fix IIO_VAL_FRACTIONAL_LOG2 for negative values
        iio: st_pressure: initialize lps22hb bootime
        iio: bmg160: reset chip when probing
        iio: cros_ec_sensors: Fix return value to get raw and calibbias data.
      62e1fd08
  3. 09 4月, 2017 7 次提交
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 2a610b8a
      Linus Torvalds 提交于
      Pull VFS fixes from Al Viro:
       "statx followup fixes and a fix for stack-smashing on alpha"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        alpha: fix stack smashing in old_adjtimex(2)
        statx: Include a mask for stx_attributes in struct statx
        statx: Reserve the top bit of the mask for future struct expansion
        xfs: report crtime and attribute flags to statx
        ext4: Add statx support
        statx: optimize copy of struct statx to userspace
        statx: remove incorrect part of vfs_statx() comment
        statx: reject unknown flags when using NULL path
        Documentation/filesystems: fix documentation for ->getattr()
      2a610b8a
    • L
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 78d91a75
      Linus Torvalds 提交于
      Pull block fixes from Jens Axboe:
       "Here's a pull request for 4.11-rc, fixing a set of issues mostly
        centered around the new scheduling framework. These have been brewing
        for a while, but split up into what we absolutely need in 4.11, and
        what we can defer until 4.12. These are well tested, on both single
        queue and multiqueue setups, and with and without shared tags. They
        fix several hangs that have happened in testing.
      
        This is obviously larger than I would have preferred at this point in
        time, but I don't think we can shave much off this and still get the
        desired results.
      
        In detail, this pull request contains:
      
         - a set of five fixes for NVMe, mostly from Christoph and one from
           Roland.
      
         - a series from Bart, fixing issues with dm-mq and SCSI shared tags
           and scheduling. Note that one of those patches commit messages may
           read like an optimization, but it is in fact an important fix for
           queue restarts in particular.
      
         - a series from Omar, most importantly fixing a hang with multiple
           hardware queues when we fail to get a driver tag. Another important
           fix in there is for resizing hardware queues, which nbd does when
           handling multiple sockets for one connection.
      
         - fixing an imbalance in putting the ctx for hctx request allocations
           from Minchan"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        blk-mq: Restart a single queue if tag sets are shared
        dm rq: Avoid that request processing stalls sporadically
        scsi: Avoid that SCSI queues get stuck
        blk-mq: Introduce blk_mq_delay_run_hw_queue()
        blk-mq: remap queues when adding/removing hardware queues
        blk-mq-sched: fix crash in switch error path
        blk-mq-sched: set up scheduler tags when bringing up new queues
        blk-mq-sched: refactor scheduler initialization
        blk-mq: use the right hctx when getting a driver tag fails
        nvmet: fix byte swap in nvmet_parse_io_cmd
        nvmet: fix byte swap in nvmet_execute_write_zeroes
        nvmet: add missing byte swap in nvmet_get_smart_log
        nvme: add missing byte swap in nvme_setup_discard
        nvme: Correct NVMF enum values to match NVMe-oF rev 1.0
        block: do not put mq context in blk_mq_alloc_request_hctx
      78d91a75
    • L
      Merge tag 'pinctrl-v4.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · c3df1c7c
      Linus Torvalds 提交于
      Pull pin control fix from Linus Walleij:
       "This late fix for pin control is hopefully the last I send this cycle.
      
        The problem was detected early in the v4.11 release cycle and there
        has been some back and forth on how to solve it. Sadly the proper fix
        arrives late, but at least not too late.
      
        An issue was detected with pin control on the Freescale i.MX after the
        refactorings for more general group and function handling.
      
        We now have the proper fix for this"
      
      * tag 'pinctrl-v4.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable()
      c3df1c7c
    • L
      Merge tag 'powerpc-4.11-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 894ca30c
      Linus Torvalds 提交于
      Pull powerpc fixes from Michael Ellerman:
       "Some more powerpc fixes for 4.11:
      
        Headed to stable:
      
         - disable HFSCR[TM] if TM is not supported, fixes a potential host
           kernel crash triggered by a hostile guest, but only in
           configurations that no one uses
      
         - don't try to fix up misaligned load-with-reservation instructions
      
         - fix flush_(d|i)cache_range() called from modules on little endian
           kernels
      
         - add missing global TLB invalidate if cxl is active
      
         - fix missing preempt_disable() in crc32c-vpmsum
      
        And a fix for selftests build changes that went in this release:
      
         - selftests/powerpc: Fix standalone powerpc build
      
        Thanks to: Benjamin Herrenschmidt, Frederic Barrat, Oliver O'Halloran,
        Paul Mackerras"
      
      * tag 'powerpc-4.11-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/crypto/crc32c-vpmsum: Fix missing preempt_disable()
        powerpc/mm: Add missing global TLB invalidate if cxl is active
        powerpc/64: Fix flush_(d|i)cache_range() called from modules
        powerpc: Don't try to fix up misaligned load-with-reservation instructions
        powerpc: Disable HFSCR[TM] if TM is not supported
        selftests/powerpc: Fix standalone powerpc build
      894ca30c
    • C
      mm/mempolicy.c: fix error handling in set_mempolicy and mbind. · cf01fb99
      Chris Salls 提交于
      In the case that compat_get_bitmap fails we do not want to copy the
      bitmap to the user as it will contain uninitialized stack data and leak
      sensitive data.
      Signed-off-by: NChris Salls <salls@cs.ucsb.edu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cf01fb99
    • L
      sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec · 425fffd8
      Liping Zhang 提交于
      Currently, inputting the following command will succeed but actually the
      value will be truncated:
      
        # echo 0x12ffffffff > /proc/sys/net/ipv4/tcp_notsent_lowat
      
      This is not friendly to the user, so instead, we should report error
      when the value is larger than UINT_MAX.
      
      Fixes: e7d316a0 ("sysctl: handle error writing UINT_MAX to u32 fields")
      Signed-off-by: NLiping Zhang <zlpnobody@gmail.com>
      Cc: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      425fffd8
    • T
      MAINTAINERS: separate out kernfs maintainership · 27f395b8
      Tejun Heo 提交于
      Separate out kernfs from driver core and add myself as a
      co-maintainer.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      27f395b8
  4. 08 4月, 2017 20 次提交