1. 05 9月, 2017 2 次提交
  2. 23 8月, 2017 1 次提交
  3. 07 8月, 2017 1 次提交
  4. 28 7月, 2017 1 次提交
    • M
      workqueue: Work around edge cases for calc of pool's cpumask · 1ad0f0a7
      Michael Bringmann 提交于
      There is an underlying assumption/trade-off in many layers of the Linux
      system that CPU <-> node mapping is static.  This is despite the presence
      of features like NUMA and 'hotplug' that support the dynamic addition/
      removal of fundamental system resources like CPUs and memory.  PowerPC
      systems, however, do provide extensive features for the dynamic change
      of resources available to a system.
      
      Currently, there is little or no synchronization protection around the
      updating of the CPU <-> node mapping, and the export/update of this
      information for other layers / modules.  In systems which can change
      this mapping during 'hotplug', like PowerPC, the information is changing
      underneath all layers that might reference it.
      
      This patch attempts to ensure that a valid, usable cpumask attribute
      is used by the workqueue infrastructure when setting up new resource
      pools.  It prevents a crash that has been observed when an 'empty'
      cpumask is passed along to the worker/task scheduling code.  It is
      intended as a temporary workaround until a more fundamental review and
      correction of the issue can be done.
      
      [With additions to the patch provided by Tejun Hao <tj@kernel.org>]
      Signed-off-by: NMichael Bringmann <mwb@linux.vnet.ibm.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      1ad0f0a7
  5. 26 7月, 2017 1 次提交
    • T
      workqueue: implicit ordered attribute should be overridable · 0a94efb5
      Tejun Heo 提交于
      5c0338c6 ("workqueue: restore WQ_UNBOUND/max_active==1 to be
      ordered") automatically enabled ordered attribute for unbound
      workqueues w/ max_active == 1.  Because ordered workqueues reject
      max_active and some attribute changes, this implicit ordered mode
      broke cases where the user creates an unbound workqueue w/ max_active
      == 1 and later explicitly changes the related attributes.
      
      This patch distinguishes explicit and implicit ordered setting and
      overrides from attribute changes if implict.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Fixes: 5c0338c6 ("workqueue: restore WQ_UNBOUND/max_active==1 to be ordered")
      0a94efb5
  6. 19 7月, 2017 5 次提交
    • T
      workqueue: restore WQ_UNBOUND/max_active==1 to be ordered · 5c0338c6
      Tejun Heo 提交于
      The combination of WQ_UNBOUND and max_active == 1 used to imply
      ordered execution.  After NUMA affinity 4c16bd32 ("workqueue:
      implement NUMA affinity for unbound workqueues"), this is no longer
      true due to per-node worker pools.
      
      While the right way to create an ordered workqueue is
      alloc_ordered_workqueue(), the documentation has been misleading for a
      long time and people do use WQ_UNBOUND and max_active == 1 for ordered
      workqueues which can lead to subtle bugs which are very difficult to
      trigger.
      
      It's unlikely that we'd see noticeable performance impact by enforcing
      ordering on WQ_UNBOUND / max_active == 1 workqueues.  Let's
      automatically set __WQ_ORDERED for those workqueues.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NChristoph Hellwig <hch@infradead.org>
      Reported-by: NAlexei Potashnik <alexei@purestorage.com>
      Fixes: 4c16bd32 ("workqueue: implement NUMA affinity for unbound workqueues")
      Cc: stable@vger.kernel.org # v3.10+
      5c0338c6
    • L
      Merge tag 'md/4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md · 74cbd96b
      Linus Torvalds 提交于
      Pull MD fixes from Shaohua Li:
      
       - raid5-ppl fix by Artur. This one is introduced in this release cycle.
      
       - raid5 reshape fix by Xiao. This is an old bug and will be added to
         stable.
      
       - bitmap fix by Guoqing.
      
      * tag 'md/4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
        raid5-ppl: use BIOSET_NEED_BVECS when creating bioset
        Raid5 should update rdev->sectors after reshape
        md/bitmap: don't read page from device with Bitmap_sync
      74cbd96b
    • A
      workqueue: doc change for ST behavior on NUMA systems · 0e0cafcd
      Alexei Potashnik 提交于
      NUMA rework of workqueue made the combination of max_active of 1 and
      WQ_UNBOUND insufficient to guarantee ST behavior system wide.
      
      alloc_ordered_queue should now be used instead.
      Signed-off-by: NAlexei Potashnik <alexei@purestorage.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      0e0cafcd
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · bef85bd7
      Linus Torvalds 提交于
      Pull rdma fixes from Doug Ledford:
       "First set of -rc fixes for 4.13 cycle:
      
         - misc iSER fixes
      
         - namespace fixups
      
         - fix the fact that IPoIB didn't use the proper API for noio mem allocs
      
         - rxe driver fixes
      
         - hns_roce fixes
      
         - misc core fixes
      
         - misc IPoIB fixes"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (27 commits)
        IB/core: Allow QP state transition from reset to error
        IB/hns: Fix for checkpatch.pl comment style warnings
        IB/hns: Fix the bug with modifying the MAC address without removing the driver
        IB/hns: Fix the bug with rdma operation
        IB/hns: Fix the bug with wild pointer when destroy rc qp
        IB/hns: Fix the bug of polling cq failed for loopback Qps
        IB/rxe: Set dma_mask and coherent_dma_mask
        IB/rxe: Fix kernel panic from skb destructor
        IB/ipoib: Let lower driver handle get_stats64 call
        IB/core: Add ordered workqueue for RoCE GID management
        IB/mlx5: Clean mr_cache debugfs in case of failure
        IB/core: Remove NOIO QP create flag
        {net, IB}/mlx4: Remove gfp flags argument
        IB/{rdmavt, qib, hfi1}: Remove gfp flags argument
        IB/IPoIB: Convert IPoIB to memalloc_noio_* calls
        IB/IPoIB: Forward MTU change to driver below
        IB: Convert msleep below 20ms to usleep_range
        IB/uverbs: Make use of ib_modify_qp variant to avoid resolving DMAC
        IB/core: Introduce modify QP operation with udata
        IB/core: Don't resolve IP address to the loopback device
        ...
      bef85bd7
    • L
      Merge tag 'nfsd-4.13-1' of git://linux-nfs.org/~bfields/linux · 15b0a8d1
      Linus Torvalds 提交于
      Pull nfsd fix from Bruce Fields:
       "One fix for a problem introduced in the most recent merge window and
        found by Dave Jones and KASAN"
      
      * tag 'nfsd-4.13-1' of git://linux-nfs.org/~bfields/linux:
        nfsd: Fix a memory scribble in the callback channel
      15b0a8d1
  7. 18 7月, 2017 26 次提交
  8. 17 7月, 2017 3 次提交
    • M
      IB/core: Don't resolve IP address to the loopback device · cbd09aeb
      Moni Shoua 提交于
      When resolving an IP address that is on the host of the caller the
      result from querying the routing table is the loopback device. This is
      not a valid response, because it doesn't represent the RDMA device and
      the port.
      
      Therefore, callers need to check the resolved device and if it is a
      loopback device find an alternative way to resolve it. To avoid this we
      make sure that the response from rdma_resolve_ip() will not be the
      loopback device.
      
      While that, we fix an static checker warning about dereferencing an
      unintitialized pointer using the same solution as in commit abeffce9
      ("net/mlx5e: Fix a -Wmaybe-uninitialized warning") as a reference.
      Signed-off-by: NMoni Shoua <monis@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      cbd09aeb
    • M
      IB/core: Namespace is mandatory input for address resolution · bebb2a47
      Moni Shoua 提交于
      In function addr_resolve() the namespace is a required input parameter
      and not an output. It is passed later for searching the routing table
      and device addresses. Also, it shouldn't be copied back to the caller.
      
      Fixes: 565edd1d ('IB/addr: Pass network namespace as a parameter')
      Cc: <stable@vger.kernel.org> # v4.3+
      Signed-off-by: NMoni Shoua <monis@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      bebb2a47
    • V
      IB/iser: Fix connection teardown race condition · c8c16d3b
      Vladimir Neyelov 提交于
      Under heavy iser target(scst) start/stop stress during login/logout
      on iser intitiator side happened trace call provided below.
      
      The function iscsi_iser_slave_alloc iser_conn pointer could be NULL,
      due to the fact that function iscsi_iser_conn_stop can be called before
      and free iser connection. Let's protect that flow by introducing global mutex.
      
      BUG: unable to handle kernel paging request at 0000000000001018
      IP: [<ffffffffc0426f7e>] iscsi_iser_slave_alloc+0x1e/0x50 [ib_iser]
      Call Trace:
      ? scsi_alloc_sdev+0x242/0x300
      scsi_probe_and_add_lun+0x9e1/0xea0
      ? kfree_const+0x21/0x30
      ? kobject_set_name_vargs+0x76/0x90
      ? __pm_runtime_resume+0x5b/0x70
      __scsi_scan_target+0xf6/0x250
      scsi_scan_target+0xea/0x100
      iscsi_user_scan_session.part.13+0x101/0x130 [scsi_transport_iscsi]
      ? iscsi_user_scan_session.part.13+0x130/0x130 [scsi_transport_iscsi]
      iscsi_user_scan_session+0x1e/0x30 [scsi_transport_iscsi]
      device_for_each_child+0x50/0x90
      iscsi_user_scan+0x44/0x60 [scsi_transport_iscsi]
      store_scan+0xa8/0x100
      ? common_file_perm+0x5d/0x1c0
      dev_attr_store+0x18/0x30
      sysfs_kf_write+0x37/0x40
      kernfs_fop_write+0x12c/0x1c0
      __vfs_write+0x18/0x40
      vfs_write+0xb5/0x1a0
      SyS_write+0x55/0xc0
      
      Fixes: 318d311e ("iser: Accept arbitrary sg lists mapping if the device supports it")
      Cc: <stable@vger.kernel.org> # v4.5+
      Signed-off-by: NVladimir Neyelov <vladimirn@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Reviewed-by: NSagi Grimberg <sagi@grimbeg.me>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      c8c16d3b