1. 05 Sep, 2017 1 commit
  2. 23 Aug, 2017 1 commit
  3. 07 Aug, 2017 1 commit
  4. 28 Jul, 2017 1 commit
    • Michael Bringmann's avatar
      workqueue: Work around edge cases for calc of pool's cpumask · 1ad0f0a7
      Michael Bringmann authored
      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: default avatarMichael Bringmann <mwb@linux.vnet.ibm.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      1ad0f0a7
  5. 25 Jul, 2017 1 commit
    • Tejun Heo's avatar
      workqueue: implicit ordered attribute should be overridable · 0a94efb5
      Tejun Heo authored
      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: default avatarTejun Heo <tj@kernel.org>
      Fixes: 5c0338c6 ("workqueue: restore WQ_UNBOUND/max_active==1 to be ordered")
      0a94efb5
  6. 19 Jul, 2017 1 commit
    • Tejun Heo's avatar
      workqueue: restore WQ_UNBOUND/max_active==1 to be ordered · 5c0338c6
      Tejun Heo authored
      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: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatarChristoph Hellwig <hch@infradead.org>
      Reported-by: default avatarAlexei Potashnik <alexei@purestorage.com>
      Fixes: 4c16bd32 ("workqueue: implement NUMA affinity for unbound workqueues")
      Cc: stable@vger.kernel.org # v3.10+
      5c0338c6
  7. 18 Jul, 2017 23 commits
  8. 17 Jul, 2017 11 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · cb8c65cc
      Linus Torvalds authored
      Pull sparc fixes from David Miller:
      
       - Fix DMA regression in 4.13 merge window, only certain chips can do
         64-bit DMA. From Dave Dushar.
      
       - Correct cpu cross-call algorithm to correctly detect stalled or stuck
         remote cpus, from Jane Chu.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc64: Measure receiver forward progress to avoid send mondo timeout
        SPARC64: Fix sun4v DMA panic
      cb8c65cc
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 935acd3f
      Linus Torvalds authored
      Pull irq fix from Thomas Gleixner:
       "Fix the fallout from reworking the locking and resource management in
        request/free_irq()"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq: Keep chip buslock across irq_request/release_resources()
      935acd3f
    • Linus Torvalds's avatar
      Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 31ba04d9
      Linus Torvalds authored
      Pull SMP fix from Thomas Gleixner:
       "Replace the bogus BUG_ON in the cpu hotplug code"
      
      * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        smp/hotplug: Replace BUG_ON and react useful
      31ba04d9
    • Linus Torvalds's avatar
      Merge tag 'regmap-fix-w1-merge-window' of... · 338a57d5
      Linus Torvalds authored
      Merge tag 'regmap-fix-w1-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
      
      Pull regmap fix from Mark Brown:
       "Fix build due to w1 header refactoring
      
        The regmap support for w1 was added shortly before a reorganization of
        the w1 headers. While this was noticed before the merge window and
        efforts made to get it resolved in what was sent that managed to fall
        through the cracks, this cleans up and updates things so we look for
        the header in the new location.
      
        It didn't cause build failures as the driver that's going to be the
        first user got held up with other review issues"
      
      * tag 'regmap-fix-w1-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: regmap-w1: Fix build troubles
      338a57d5
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · e8e9941b
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is actually just a small set of mainly bug fixes for the original
        merge window code plus a few trivial updates and qedi boot from SAN
        support feature patch"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: libfc: pass an error pointer to fc_disc_error()
        scsi: hisi_sas: make several const arrays static
        scsi: qla2xxx: Off by one in qlt_ctio_to_cmd()
        scsi: sg: fix SG_DXFER_FROM_DEV transfers
        scsi: virtio_scsi: always read VPD pages for multiqueue too
        scsi: qedf: fix spelling mistake: "offlading" -> "offloading"
        scsi: qedi: fix another spelling mistake: "alloction" -> "allocation"
        scsi: isci: fix typo in function names
        scsi: cxlflash: return -EFAULT if copy_from_user() fails
        scsi: qedi: Add support for Boot from SAN over iSCSI offload
      e8e9941b
    • Geert Uytterhoeven's avatar
      Blackfin: flat: Use %x to format u32 · cb0fbbf2
      Geert Uytterhoeven authored
      Several variables had their types changed from unsigned long to u32,
      but the printk()-style format to print them wasn't updated, leading to:
      
          arch/blackfin/kernel/flat.c: In function 'bfin_get_addr_from_rp':
          arch/blackfin/kernel/flat.c:35:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'u32' [-Wformat]
          arch/blackfin/kernel/flat.c: In function 'bfin_put_addr_at_rp':
          arch/blackfin/kernel/flat.c:80:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'u32' [-Wformat]
      
      Fixes: 468138d7 ("binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail")
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cb0fbbf2
    • Trond Myklebust's avatar
      nfsd: Fix a memory scribble in the callback channel · eff79368
      Trond Myklebust authored
      The offset of the entry in struct rpc_version has to match the version
      number.
      Reported-by: default avatarDave Jones <davej@codemonkey.org.uk>
      Fixes: 1c5876dd ("sunrpc: move p_count out of struct rpc_procinfo")
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      Reported-by: default avatarDave Jones <davej@codemonkey.org.uk>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      eff79368
    • Moni Shoua's avatar
      IB/core: Don't resolve IP address to the loopback device · cbd09aeb
      Moni Shoua authored
      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: default avatarMoni Shoua <monis@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      cbd09aeb
    • Moni Shoua's avatar
      IB/core: Namespace is mandatory input for address resolution · bebb2a47
      Moni Shoua authored
      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: default avatarMoni Shoua <monis@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      bebb2a47
    • Vladimir Neyelov's avatar
      IB/iser: Fix connection teardown race condition · c8c16d3b
      Vladimir Neyelov authored
      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: default avatarVladimir Neyelov <vladimirn@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Reviewed-by: default avatarSagi Grimberg <sagi@grimbeg.me>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      c8c16d3b
    • Gustavo A. R. Silva's avatar
      RDMA/core: Document confusing code · 28b5b3a2
      Gustavo A. R. Silva authored
      While looking into Coverity ID 1351047 I ran into the following
      piece of code at
      drivers/infiniband/core/verbs.c:496:
      
      ret = rdma_addr_find_l2_eth_by_grh(&dgid, &sgid,
                                         ah_attr->dmac,
                                         wc->wc_flags & IB_WC_WITH_VLAN ?
                                         NULL : &vlan_id,
                                         &if_index, &hoplimit);
      
      The issue here is that the position of arguments in the call to
      rdma_addr_find_l2_eth_by_grh() function do not match the order of
      the parameters:
      
      &dgid is passed to sgid
      &sgid is passed to dgid
      
      This is the function prototype:
      
      int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid,
       				 const union ib_gid *dgid,
       				 u8 *dmac, u16 *vlan_id, int *if_index,
       				 int *hoplimit)
      
      My question here is if this is intentional?
      
      Answer:
      Yes. ib_init_ah_from_wc() creates ah from the incoming packet.
      Incoming packet has dgid of the receiver node on which this code is
      getting executed and sgid contains the GID of the sender.
      
      When resolving mac address of destination, you use arrived dgid as
      sgid and use sgid as dgid because sgid contains destinations GID whom to
      respond to.
      Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      28b5b3a2