1. 09 Sep, 2016 5 commits
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · e45eeb43
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - smp_mb__before_spinlock() changed to smp_mb() on arm64 since the
         generic definition to smp_wmb() is not sufficient
      
       - avoid a recursive loop with the graph tracer by using using
         preempt_(enable|disable)_notrace in _percpu_(read|write)
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: use preempt_disable_notrace in _percpu_read/write
        arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb()
      e45eeb43
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.8-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 2771fc8e
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Fixes marked for stable:
         - Don't alias user region to other regions below PAGE_OFFSET from
           Paul Mackerras
         - Fix again csum_partial_copy_generic() on 32-bit from Christophe
           Leroy
         - Fix corrupted PE allocation bitmap on releasing PE from Gavin Shan
      
        Fixes for code merged this cycle:
         - Fix crash on releasing compound PE from Gavin Shan
         - Fix processor numbers in OPAL ICP from Benjamin Herrenschmidt
         - Fix little endian build with CONFIG_KEXEC=n from Thiago Jung
           Bauermann"
      
      * tag 'powerpc-4.8-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/mm: Don't alias user region to other regions below PAGE_OFFSET
        powerpc/32: Fix again csum_partial_copy_generic()
        powerpc/powernv: Fix corrupted PE allocation bitmap on releasing PE
        powerpc/powernv: Fix crash on releasing compound PE
        powerpc/xics/opal: Fix processor numbers in OPAL ICP
        powerpc/pseries: Fix little endian build with CONFIG_KEXEC=n
      2771fc8e
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm · 53d5f1dc
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "A few ARM fixes:
      
         - Robin Murphy noticed that the non-secure privileged entry was
           relying on undefined behaviour, which needed to be fixed.
      
         - Vladimir Murzin noticed that prov-v7 fails to build for MMUless
           configurations because a required header file wasn't included.
      
         - A bunch of fixes for StrongARM regressions found while testing
           4.8-rc on such platforms"
      
      * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: sa1100: clear reset status prior to reboot
        ARM: 8600/1: Enforce some NS-SVC initialisation
        ARM: 8599/1: mm: pull asm/memory.h explicitly
        ARM: sa1100: register clocks early
        ARM: sa1100: fix 3.6864MHz clock
      53d5f1dc
    • Chunyan Zhang's avatar
      arm64: use preempt_disable_notrace in _percpu_read/write · 2b974344
      Chunyan Zhang authored
      When debug preempt or preempt tracer is enabled, preempt_count_add/sub()
      can be traced by function and function graph tracing, and
      preempt_disable/enable() would call preempt_count_add/sub(), so in Ftrace
      subsystem we should use preempt_disable/enable_notrace instead.
      
      In the commit 345ddcc8 ("ftrace: Have set_ftrace_pid use the bitmap
      like events do") the function this_cpu_read() was added to
      trace_graph_entry(), and if this_cpu_read() calls preempt_disable(), graph
      tracer will go into a recursive loop, even if the tracing_on is
      disabled.
      
      So this patch change to use preempt_enable/disable_notrace instead in
      this_cpu_read().
      
      Since Yonghui Yang helped a lot to find the root cause of this problem,
      so also add his SOB.
      Signed-off-by: default avatarYonghui Yang <mark.yang@spreadtrum.com>
      Signed-off-by: default avatarChunyan Zhang <zhang.chunyan@linaro.org>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      2b974344
    • Will Deacon's avatar
      arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb() · 872c63fb
      Will Deacon authored
      smp_mb__before_spinlock() is intended to upgrade a spin_lock() operation
      to a full barrier, such that prior stores are ordered with respect to
      loads and stores occuring inside the critical section.
      
      Unfortunately, the core code defines the barrier as smp_wmb(), which
      is insufficient to provide the required ordering guarantees when used in
      conjunction with our load-acquire-based spinlock implementation.
      
      This patch overrides the arm64 definition of smp_mb__before_spinlock()
      to map to a full smp_mb().
      
      Cc: <stable@vger.kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Reported-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      872c63fb
  2. 08 Sep, 2016 12 commits
  3. 07 Sep, 2016 8 commits
  4. 06 Sep, 2016 15 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · d060e0f6
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "This is the second pull request for the rdma subsystem.  Most of the
        patches are small and obvious.  I took two patches in that are larger
        than I wanted this late in the cycle.
      
        The first is the hfi1 patch that implements a work queue to test the
        QSFP read state.  I originally rejected the first patch for this
        (which would have place up to 20 seconds worth of udelays in their
        probe routine).  They then rewrote it the way I wanted (use delayed
        work tasks to wait asynchronously up to 20 seconds for the QSFP to
        come alive), so I can't really complain about the size of getting what
        I asked for :-/.
      
        The second is large because it switches the rcu locking in the debugfs
        code.  Since a locking change like this is done all at once, the size
        it what it is.  It resolves a litany of debug messages from the
        kernel, so I pulled it in for -rc.
      
        The rest are all typical -rc worthy patches I think.
      
        There will still be a third -rc pull request from the rdma subsystem
        this release.  I hope to have that one ready to go by the end of this
        week or early next.
      
        Summary:
      
         - a smattering of small fixes across the core, ipoib, i40iw, isert,
           cxgb4, and mlx4
      
         - a slightly larger group of fixes to each of mlx5 and hfi1"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        IB/hfi1: Rework debugfs to use SRCU
        IB/hfi1: Make n_krcvqs be an unsigned long integer
        IB/hfi1: Add QSFP sanity pre-check
        IB/hfi1: Fix AHG KDETH Intr shift
        IB/hfi1: Fix SGE length for misaligned PIO copy
        IB/mlx5: Don't return errors from poll_cq
        IB/mlx5: Use TIR number based on selector
        IB/mlx5: Simplify code by removing return variable
        IB/mlx5: Return EINVAL when caller specifies too many SGEs
        IB/mlx4: Don't return errors from poll_cq
        Revert "IB/mlx4: Return EAGAIN for any error in mlx4_ib_poll_one"
        IB/ipoib: Fix memory corruption in ipoib cm mode connect flow
        IB/core: Fix use after free in send_leave function
        IB/cxgb4: Make _free_qp static to silence build warning
        IB/isert: Properly release resources on DEVICE_REMOVAL
        IB/hfi1: Fix the size parameter to find_first_bit
        IB/mlx5: Fix the size parameter to find_first_bit
        IB/hfi1: Clean up type used and casting
        i40iw: Receive notification events correctly
        i40iw: Update hw_iwarp_state
      d060e0f6
    • Kees Cook's avatar
      lkdtm: adjust usercopy tests to bypass const checks · 3c17648c
      Kees Cook authored
      The hardened usercopy is now consistently avoiding checks against const
      sizes, since we really only want to perform runtime bounds checking
      on lengths that weren't known at build time. To test the hardened usercopy
      code, we must force the length arguments to be seen as non-const.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      3c17648c
    • Kees Cook's avatar
      usercopy: fold builtin_const check into inline function · 81409e9e
      Kees Cook authored
      Instead of having each caller of check_object_size() need to remember to
      check for a const size parameter, move the check into check_object_size()
      itself. This actually matches the original implementation in PaX, though
      this commit cleans up the now-redundant builtin_const() calls in the
      various architectures.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      81409e9e
    • Kees Cook's avatar
      x86/uaccess: force copy_*_user() to be inlined · e6971009
      Kees Cook authored
      As already done with __copy_*_user(), mark copy_*_user() as __always_inline.
      Without this, the checks for things like __builtin_const_p() won't work
      consistently in either hardened usercopy nor the recent adjustments for
      detecting usercopy overflows at compile time.
      
      The change in kernel text size is detectable, but very small:
      
       text      data     bss     dec      hex     filename
      12118735  5768608 14229504 32116847 1ea106f vmlinux.before
      12120207  5768608 14229504 32118319 1ea162f vmlinux.after
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      e6971009
    • Linus Torvalds's avatar
      Merge branch 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration · 46738ab3
      Linus Torvalds authored
      Pull mailbox fixes from Jassi Brar:
       "Misc fixes for BCM mailbox driver
      
         - Fix build warnings by making static functions used within the file.
         - Check for potential NULL before dereferencing
         - Fix link error by defining HAS_DMA dependency"
      
      * 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        fix:mailbox:bcm-pdc-mailbox:mark symbols static where possible
        mailbox: bcm-pdc: potential NULL dereference in pdc_shutdown()
        mailbox: Add HAS_DMA Kconfig dependency to BCM_PDC_MBOX
      46738ab3
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 6296c412
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is really three fixes, but the SES one comes in a bundle of three
        (making the replacement API available properly, using it and removing
        the non-working one).  The SES problem causes an oops on hpsa devices
        because they attach virtual disks to the host which aren't SAS
        attached (the replacement API ignores them).
      
        The other two fixes are fairly minor: the sense key one means we
        actually resolve a newly added sense key and the RDAC device
        blacklisting is needed to prevent us annoying the universal XPORT lun
        of various RDAC arrays"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: sas: remove is_sas_attached()
        scsi: ses: use scsi_is_sas_rphy instead of is_sas_attached
        scsi: sas: provide stub implementation for scsi_is_sas_rphy
        scsi: blacklist all RDAC devices for BLIST_NO_ULD_ATTACH
        scsi: fix upper bounds check of sense key in scsi_sense_key_string()
      6296c412
    • Linus Torvalds's avatar
      Merge tag 'regmap-fix-v4.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · ec9a03d4
      Linus Torvalds authored
      Pull regmap fixes from Mark Brown:
       "Several fixes here, the main one being the change from Lars-Peter
        which I'd been letting soak in -next since the merge window in case it
        uncovered further issues as it's a minimal fix rather than a change
        addressing the root cause of the problems (which would've been too
        invasive for -rc):
      
         - The biggest change is a fix from Lars-Peter to ensure that we don't
           create overlapping rbtree nodes which in turn avoids returning
           corrupt cache values to users, fixing some issues that were exposed
           by some recent optimisations with certain access patterns but had
           been present for a long time.
      
         - A fix from Elaine Zhang to stop us updating the cache if we get an
           I/O error when writing to the hardware.
      
         - A fix fromm Maarten ter Huurne to avoid uninitialized defaults in
           cases where we have non-readable registers but are initializing the
           cache by reading from the device"
      
      * tag 'regmap-fix-v4.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: drop cache if the bus transfer error
        regmap: rbtree: Avoid overlapping nodes
        regmap: cache: Fix num_reg_defaults computation from reg_defaults_raw
      ec9a03d4
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v4.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 8ded8f00
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "As well as the usual driver fixes there's a couple of non-trivial core
        fixes in here:
      
         - Fixes for issues reported by Julia Lawall in the changes that were
           sent last time to fix interaction between the bus lock and the
           locking done for the SPI thread.  I'd let this one cook for a while
           to make sure nothing else came up in testing.
      
         - A fix from Sien Wu for arithmetic overflows when calculating the
           timeout for larger transfers (espcially common with slow buses with
           flashes on them)"
      
      * tag 'spi-fix-v4.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: Prevent unexpected SPI time out due to arithmetic overflow
        spi: pxa2xx-pci: fix ACPI-based enumeration of SPI devices
        MAINTAINERS: add myself as Samsung SPI maintainer
        spi: Drop io_mutex in error paths
        spi: sh-msiof: Avoid invalid clock generator parameters
        spi: img-spfi: Remove spi_master_put in img_spfi_remove()
        spi: mediatek: remove spi_master_put in mtk_spi_remove()
        spi: qup: Remove spi_master_put in spi_qup_remove()
      8ded8f00
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v4.8-rc5' of... · 8fa5729d
      Linus Torvalds authored
      Merge tag 'regulator-fix-v4.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fixes from Mark Brown:
       "Two things here, one an e-mail update for Krzysztof Kozlowski and the
        other a couple of fixes for issues with incorrectly described voltages
        in a couple of the Qualcomm regulator drivers that were breaking MMC
        on some platforms"
      
      * tag 'regulator-fix-v4.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: Change Krzysztof Kozlowski's email to kernel.org
        regulator: qcom_smd: Fix voltage ranges for pma8084 ftsmps and pldo
        regulator: qcom_smd: Fix voltage ranges for pm8x41
      8fa5729d
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v4.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 4c601e0d
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "Nothing special at all, just three SoC-specific driver fixes:
      
         - Fix routing problems in pistachio (Imagination) and sunxi
           (AllWinner)
      
         - Fix an interrupt problem in the Cherryview (Intel)"
      
      * tag 'pinctrl-v4.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: sunxi: fix uart1 CTS/RTS pins at PG on A23/A33
        pinctrl: cherryview: Do not mask all interrupts in probe
        pinctrl: pistachio: fix mfio pll_lock pinmux
      4c601e0d
    • Dirk Behme's avatar
      thermal: rcar_thermal: Fix priv->zone error handling · 87260d3f
      Dirk Behme authored
      In case thermal_zone_xxx_register() returns an error, priv->zone
      isn't NULL any more, but contains the error code.
      
      This is passed to thermal_zone_device_unregister(), then. This checks
      for priv->zone being NULL, but the error code is != NULL. So it works
      with the error code as a pointer. Crashing immediately.
      
      To fix this, reset priv->zone to NULL before entering
      rcar_gen3_thermal_remove().
      Signed-off-by: default avatarDirk Behme <dirk.behme@de.bosch.com>
      Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      87260d3f
    • Mark Brown's avatar
      Merge remote-tracking branches 'spi/fix/lock', 'spi/fix/maintainers',... · ae4860b5
      Mark Brown authored
      Merge remote-tracking branches 'spi/fix/lock', 'spi/fix/maintainers', 'spi/fix/put', 'spi/fix/pxa2xx', 'spi/fix/sh-msiof' and 'spi/fix/timeout' into spi-linus
      ae4860b5
    • Mark Brown's avatar
      Merge remote-tracking branches 'regulator/fix/email' and... · 78cefcbe
      Mark Brown authored
      Merge remote-tracking branches 'regulator/fix/email' and 'regulator/fix/qcom-smd' into regulator-linus
      78cefcbe
    • Gavin Shan's avatar
      powerpc/powernv: Fix crash on releasing compound PE · b314427a
      Gavin Shan authored
      The compound PE is created to accommodate the devices attached to
      one specific PCI bus that consume multiple M64 segments. The compound
      PE is made up of one master PE and possibly multiple slave PEs. The
      slave PEs should be destroyed when releasing the master PE. A kernel
      crash happens when derferencing @pe->pdev on releasing the slave PE
      in pnv_ioda_deconfigure_pe().
      
        # echo 0 > /sys/bus/pci/slots/C7/power
        iommu: Removing device 0000:01:00.1 from group 0
        iommu: Removing device 0000:01:00.0 from group 0
        Unable to handle kernel paging request for data at address 0x00000010
        Faulting instruction address: 0xc00000000005d898
        cpu 0x1: Vector: 300 (Data Access) at [c000000fe8217620]
            pc: c00000000005d898: pnv_ioda_release_pe+0x288/0x610
            lr: c00000000005dbdc: pnv_ioda_release_pe+0x5cc/0x610
            sp: c000000fe82178a0
           msr: 9000000000009033
           dar: 10
         dsisr: 40000000
          current = 0xc000000fe815ab80
          paca    = 0xc00000000ff00400	 softe: 0	 irq_happened: 0x01
            pid   = 2709, comm = sh
        Linux version 4.8.0-rc5-gavin-00006-g745efdb (gwshan@gwshan) \
        (gcc version 4.9.3 (Buildroot 2016.02-rc2-00093-g5ea3bce) ) #586 SMP \
        Tue Sep 6 13:37:29 AEST 2016
        enter ? for help
        [c000000fe8217940] c00000000005d684 pnv_ioda_release_pe+0x74/0x610
        [c000000fe82179e0] c000000000034460 pcibios_release_device+0x50/0x70
        [c000000fe8217a10] c0000000004aba80 pci_release_dev+0x50/0xa0
        [c000000fe8217a40] c000000000704898 device_release+0x58/0xf0
        [c000000fe8217ac0] c000000000470510 kobject_release+0x80/0xf0
        [c000000fe8217b00] c000000000704dd4 put_device+0x24/0x40
        [c000000fe8217b20] c0000000004af94c pci_remove_bus_device+0x12c/0x150
        [c000000fe8217b60] c000000000034244 pci_hp_remove_devices+0x94/0xd0
        [c000000fe8217ba0] c0000000004ca444 pnv_php_disable_slot+0x64/0xb0
        [c000000fe8217bd0] c0000000004c88c0 power_write_file+0xa0/0x190
        [c000000fe8217c50] c0000000004c248c pci_slot_attr_store+0x3c/0x60
        [c000000fe8217c70] c0000000002d6494 sysfs_kf_write+0x94/0xc0
        [c000000fe8217cb0] c0000000002d50f0 kernfs_fop_write+0x180/0x260
        [c000000fe8217d00] c0000000002334a0 __vfs_write+0x40/0x190
        [c000000fe8217d90] c000000000234738 vfs_write+0xc8/0x240
        [c000000fe8217de0] c000000000236250 SyS_write+0x60/0x110
        [c000000fe8217e30] c000000000009524 system_call+0x38/0x108
      
      It fixes the kernel crash by bypassing releasing resources (DMA,
      IO and memory segments, PELTM) because there are no resources assigned
      to the slave PE.
      
      Fixes: c5f7700b ("powerpc/powernv: Dynamically release PE")
      Reported-by: default avatarFrederic Barrat <fbarrat@linux.vnet.ibm.com>
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      b314427a
    • Benjamin Herrenschmidt's avatar
      powerpc/xics/opal: Fix processor numbers in OPAL ICP · f8e33475
      Benjamin Herrenschmidt authored
      When using the OPAL ICP backend we incorrectly pass Linux CPU numbers
      rather than HW CPU numbers to OPAL.
      
      Fixes: d7436188 ("powerpc/xics: Add ICP OPAL backend")
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      f8e33475