1. 13 Jul, 2017 15 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20170713' of git://git.infradead.org/linux-mtd · b5e16170
      Linus Torvalds authored
      Pull MTD updates from Brian Norris:
       "General updates:
         - Cleanups and additional flash support for "dataflash" driver
         - new driver for mchp23k256 SPI SRAM device
         - improve handling of MTDs without eraseblocks (i.e., MTD_NO_ERASE)
         - refactor and improve "sub-partition" handling with TRX partition
           parser; partitions can now be created as sub-partitions of another
           partition
      
        SPINOR updates, from Cyrille Pitchen and Marek Vasut:
         - introduce support to the SPI 1-2-2 and 1-4-4 protocols.
         - introduce support to the Double Data Rate (DDR) mode.
         - introduce support to the Octo SPI protocols.
         - add support to new memory parts for Spansion, Macronix and Winbond.
         - add fixes for the Aspeed, STM32 and Cadence QSPI controler drivers.
         - clean up the st_spi_fsm driver.
      
        NAND updates, from Boris Brezillon:
         - addition of on-die ECC support to Micron driver
         - addition of helpers to help drivers choose most appropriate ECC
           settings
         - deletion of dead-code (cached programming and ->errstat() hook)
         - make sure drivers that do not support the SET/GET FEATURES command
           return ENOTSUPP use a dummy ->set/get_features implementation
           returning -ENOTSUPP (required for Micron on-die ECC)
         - change the semantic of ecc->write_page() for drivers setting the
           NAND_ECC_CUSTOM_PAGE_ACCESS flag
         - support exiting 'GET STATUS' command in default ->cmdfunc()
           implementations
         - change the prototype of ->setup_data_interface()
      
        A bunch of driver related changes:
         - various cleanup, fixes and improvements of the MTK driver
         - OMAP DT bindings fixes
         - support for ->setup_data_interface() in the fsmc driver
         - support for imx7 in the gpmi driver
         - finalization of the denali driver rework (thanks to Masahiro for
           the work he's done on this driver)
         - fix "bitflips in erased pages" handling in the ifc driver
         - addition of PM ops and dynamic timing configuration to the atmel
           driver"
      
      * tag 'for-linus-20170713' of git://git.infradead.org/linux-mtd: (118 commits)
        Documentation: ABI: mtd: describe "offset" more precisely
        mtd: Fix check in mtd_unpoint()
        mtd: nand: mtk: release lock on error path
        mtd: st_spi_fsm: remove SPINOR_OP_RDSR2 and use SPINOR_OP_RDCR instead
        mtd: spi-nor: cqspi: remove duplicate const
        mtd: spi-nor: Add support for Spansion S25FL064L
        mtd: spi-nor: Add support for mx66u51235f
        mtd: nand: mtk: add ->setup_data_interface() hook
        mtd: nand: mtk: remove unneeded mtk_ecc_hw_init from mtk_ecc_resume
        mtd: nand: mtk: remove unneeded mtk_nfc_hw_init from mtk_nfc_resume
        mtd: nand: mtk: disable ecc irq when writing page with hwecc
        mtd: nand: mtk: fix incorrect register setting order about ecc irq
        mtd: partitions: fixup some allocate_partition() whitespace
        mtd: parsers: trx: fix pr_err format for printing offset
        MAINTAINERS: Update SPI NOR subsystem git repositories
        mtd: extract TRX parser out of bcm47xxpart into a separated module
        mtd: partitions: add support for partition parsers
        mtd: partitions: add support for subpartitions
        mtd: partitions: rename "master" to the "parent" where appropriate
        mtd: partitions: remove sysfs files when deleting all master's partitions
        ...
      b5e16170
    • Linus Torvalds's avatar
      Merge tag 'fbdev-v4.13' of git://github.com/bzolnier/linux · da16dd97
      Linus Torvalds authored
      Pull fbdev updates from Bartlomiej Zolnierkiewicz:
       "There is nothing really major here, just a couple of small bugfixes,
        improvements and cleanups.
      
         - fix get_fb_unmapped_area() helper handling (Benjamin Gaignard)
      
         - check return value of clk_prepare_enable() in pxafb driver (Arvind
           Yadav)
      
         - fix error path handling in vmlfb driver (Alexey Khoroshilov)
      
         - printks fixes/cleanups for uvesafb driver (Joe Perches)
      
         - fix unusued variable warning in atyfb driver (Arnd Bergmann)
      
         - constifications for sh_mobile_lcdcfb, fsl-diu-fb, omapfb (Arvind
           Yadav)
      
         - mdacon driver cleanups (Jiri Slaby)
      
         - misc cleanups (Andy Shevchenko, Karim Eshapa, Gustavo A. R. Silva,
           Dan Carpenter)"
      
      * tag 'fbdev-v4.13' of git://github.com/bzolnier/linux:
        fbdev: make get_fb_unmapped_area depends of !MMU
        atyfb: hide unused variable
        video: fbdev: matrox: the list iterator can't be NULL
        video: fbdev: aty: remove useless variable assignments in aty_var_to_crtc()
        fbdev: omapfb: constify ctrl_caps, color_caps, panel_attr_grp and ctrl_attr_grp
        omapfb: panel-dsi-cm: constify dsicm_attr_group
        vmlfb: Fix error handling in cr_pll_init()
        video: fbdev: fsl-diu-fb: constify mfb_template and fsl_diu_match.
        uvesafb: Fix continuation printks without KERN_LEVEL to pr_cont, neatening
        video: fbdev: sh_mobile_lcdcfb: constify sh_mobile_lcdc_bl_ops.
        omapfb: Use sysfs_match_string() helper
        video: fbdev: pxafb: Handle return value of clk_prepare_enable
        video: fbdev: omap2: omapfb: displays: panel-dsi-cm: Use time comparison kernel macro.
        mdacon: replace MDA_ADDR macro by inline function
        mdacon: make mda_vram_base u16 *
        mdacon: align code in mda_detect properly
      da16dd97
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-4.13-rc1' of... · 38f7d2da
      Linus Torvalds authored
      Merge tag 'pwm/for-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "This release cycle's changes include mostly updates and cleanups to
        existing drivers along with a few cleanups to the core, documentation
        and device tree bindings"
      
      * tag 'pwm/for-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
        pwm: cros-ec: Fix transposed param settings
        pwm: meson: Improve PWM calculation precision
        dt-bindings: pwm: meson: Add compatible for gxbb ao PWMs
        pwm: meson: Add compatible for the gxbb ao PWMs
        pwm: sun4i: Drop legacy callbacks
        pwm: sun4i: Switch to atomic PWM
        pwm: sun4i: Improve hardware read out
        pwm: hibvt: Constify hibvt_pwm_ops
        pwm: Silently error out on EPROBE_DEFER
        pwm: Standardize document format
        pwm: bfin: Remove unneeded error message
        dt-bindings: pwm: Update STM32 timers clock names
        dt-bindings: pwm: Add R-Car M3-W device tree bindings
        pwm: tegra: Set maximum pwm clock source per SoC tapeout
      38f7d2da
    • Linus Torvalds's avatar
      Merge tag 'for-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply · dc087d1e
      Linus Torvalds authored
      Pull power supply fixes from  Reichel:
       "I have two more fixes for the power-supply subsystem:
      
         - two fixes for twl4030-charger"
      
      * tag 'for-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
        power: supply: twl4030-charger: add deferred probing for phy and iio
        power: supply: twl4030-charger: move irq allocation to just before irqs are enabled
      dc087d1e
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.13-rc1' of git://people.freedesktop.org/~airlied/linux · 311ac00d
      Linus Torvalds authored
      Pull more drm updates from Dave Airlie:
       "i915, amd and some core fixes + mediatek color support.
      
        Some fixes tree came in since the main pull request for rc1, primarily
        i915 and drm-misc and one amd fix. The drm core vblank regression fix
        is probably the most important thing.
      
        I've also added the mediatek feature pull, it wasn't that big and
        didn't look like it would have any impact outside of mediatek, in fact
        it looks to just be a single feature, and some cleanups"
      
      * tag 'drm-fixes-for-v4.13-rc1' of git://people.freedesktop.org/~airlied/linux: (31 commits)
        drm/i915: Make DP-MST connector info work
        drm/i915/gvt: Use fence error from GVT request for workload status
        drm/i915/gvt: remove scheduler_mutex in per-engine workload_thread
        drm/i915/gvt: Revert "drm/i915/gvt: Fix possible recursive locking issue"
        drm/i915/gvt: Audit the command buffer address
        drm/i915/gvt: Fix a memory leak in intel_gvt_init_gtt()
        drm/rockchip: fix NULL check on devm_kzalloc() return value
        drm/i915/fbdev: Check for existence of ifbdev->vma before operations
        drm/radeon: Fix eDP for single-display iMac10,1 (v2)
        drm/i915: Hold RPM wakelock while initializing OA buffer
        drm/i915/cnl: Fix the CURSOR_COEFF_MASK used in DDI Vswing Programming
        drm/i915/cfl: Fix Workarounds.
        drm/i915: Avoid undefined behaviour of "u32 >> 32"
        drm/i915: reintroduce VLV/CHV PFI programming power domain workaround
        drm/i915: Fix an error checking test
        drm/i915: Disable MSI for all pre-gen5
        drm/atomic: Add missing drm_atomic_state_clear to atomic_remove_fb
        drm: vblank: Fix vblank timestamp update
        drm/i915/gvt: Make function dpy_reg_mmio_readx safe
        drm/mediatek: separate color module to fixup error memory reallocation
        ...
      311ac00d
    • Jeffy Chen's avatar
      drm: Add missing field copy in compat_drm_version · 266530b3
      Jeffy Chen authored
      DRM_IOCTL_VERSION is supposed to update the name_len/date_len/desc_len
      fields to user.
      
      Fixes: 012c6741 ("switch compat_drm_version() to drm_ioctl_kernel()")
      Signed-off-by: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      266530b3
    • Rafał Miłecki's avatar
      Documentation: ABI: mtd: describe "offset" more precisely · 7d84120b
      Rafał Miłecki authored
      So far Linux supported only two levels of MTD devices so we didn't need
      a very precise description for this sysfs file. With commit
      97519dc5 ("mtd: partitions: add support for subpartitions") there
      is support for a tree structure so we should have more precise
      description. Using "parent" and "flash device" makes it more accurate.
      Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      7d84120b
    • Dave Airlie's avatar
      Merge branch 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-next · 6419ec78
      Dave Airlie authored
      single r700 fix.
      * 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux:
        drm/radeon: Fix eDP for single-display iMac10,1 (v2)
      6419ec78
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace · 4ca6df13
      Linus Torvalds authored
      Pull sysctl fix from Eric Biederman:
       "A rather embarassing and hard to hit bug was merged into 4.11-rc1.
      
        Andrei Vagin tracked this bug now and after some staring at the code
        I came up with a fix"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        proc: Fix proc_sys_prune_dcache to hold a sb reference
      4ca6df13
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · edaf3825
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
      1) Fix 64-bit division in mlx5 IPSEC offload support, from Ilan Tayari
         and Arnd Bergmann.
      
      2) Fix race in statistics gathering in bnxt_en driver, from Michael
         Chan.
      
      3) Can't use a mutex in RCU reader protected section on tap driver, from
         Cong WANG.
      
      4) Fix mdb leak in bridging code, from Eduardo Valentin.
      
      5) Fix free of wrong pointer variable in nfp driver, from Dan Carpenter.
      
      6) Buffer overflow in brcmfmac driver, from Arend van SPriel.
      
      7) ioremap_nocache() return value needs to be checked in smsc911x
         driver, from Alexey Khoroshilov.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (34 commits)
        net: stmmac: revert "support future possible different internal phy mode"
        sfc: don't read beyond unicast address list
        datagram: fix kernel-doc comments
        socket: add documentation for missing elements
        smsc911x: Add check for ioremap_nocache() return code
        brcmfmac: fix possible buffer overflow in brcmf_cfg80211_mgmt_tx()
        net: hns: Bugfix for Tx timeout handling in hns driver
        net: ipmr: ipmr_get_table() returns NULL
        nfp: freeing the wrong variable
        mlxsw: spectrum_switchdev: Check status of memory allocation
        mlxsw: spectrum_switchdev: Remove unused variable
        mlxsw: spectrum_router: Fix use-after-free in route replace
        mlxsw: spectrum_router: Add missing rollback
        samples/bpf: fix a build issue
        bridge: mdb: fix leak on complete_info ptr on fail path
        tap: convert a mutex to a spinlock
        cxgb4: fix BUG() on interrupt deallocating path of ULD
        qed: Fix printk option passed when printing ipv6 addresses
        net: Fix minor code bug in timestamping.txt
        net: stmmac: Make 'alloc_dma_[rt]x_desc_resources()' look even closer
        ...
      edaf3825
    • Linus Torvalds's avatar
      disable new gcc-7.1.1 warnings for now · bd664f6b
      Linus Torvalds authored
      I made the mistake of upgrading my desktop to the new Fedora 26 that
      comes with gcc-7.1.1.
      
      There's nothing wrong per se that I've noticed, but I now have 1500
      lines of warnings, mostly from the new format-truncation warning
      triggering all over the tree.
      
      We use 'snprintf()' and friends in a lot of places, and often know that
      the numbers are fairly small (ie a controller index or similar), but gcc
      doesn't know that, and sees an 'int', and thinks that it could be some
      huge number.  And then complains when our buffers are not able to fit
      the name for the ten millionth controller.
      
      These warnings aren't necessarily bad per se, and we probably want to
      look through them subsystem by subsystem, but at least during the merge
      window they just mean that I can't even see if somebody is introducing
      any *real* problems when I pull.
      
      So warnings disabled for now.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bd664f6b
    • Dave Airlie's avatar
      Merge tag 'drm-misc-next-fixes-2017-07-10' of... · 0355e22a
      Dave Airlie authored
      Merge tag 'drm-misc-next-fixes-2017-07-10' of git://anongit.freedesktop.org/git/drm-misc into drm-next
      
      Core Changes:
      - Fix empty timestamps on hw without vlbank counter (Laurent)
      - Clear atomic state before retrying ww/mutex acquisition in remove_fb (Maarten)
      
      Driver Changes:
      - rockchip: Fix incorrect NULL pointer check after allocation (Gustavo)
      
      Cc: Gustavo A. R. Silva <garsilva@embeddedor.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      
      * tag 'drm-misc-next-fixes-2017-07-10' of git://anongit.freedesktop.org/git/drm-misc:
        drm/rockchip: fix NULL check on devm_kzalloc() return value
        drm/atomic: Add missing drm_atomic_state_clear to atomic_remove_fb
        drm: vblank: Fix vblank timestamp update
        DRM: Fix an incorrectly formatted table
        bridge: Fix panel-bridge error return on !panel.
        drm/rockchip: gem: add the lacks lock and trivial changes
      0355e22a
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-fixes-2017-07-11' of... · caa164e3
      Dave Airlie authored
      Merge tag 'drm-intel-next-fixes-2017-07-11' of git://anongit.freedesktop.org/git/drm-intel into drm-next
      
      drm/i915 fixes for v4.13-rc1
      
      * tag 'drm-intel-next-fixes-2017-07-11' of git://anongit.freedesktop.org/git/drm-intel:
        drm/i915: Make DP-MST connector info work
        drm/i915/gvt: Use fence error from GVT request for workload status
        drm/i915/gvt: remove scheduler_mutex in per-engine workload_thread
        drm/i915/gvt: Revert "drm/i915/gvt: Fix possible recursive locking issue"
        drm/i915/gvt: Audit the command buffer address
        drm/i915/gvt: Fix a memory leak in intel_gvt_init_gtt()
        drm/i915/fbdev: Check for existence of ifbdev->vma before operations
        drm/i915: Hold RPM wakelock while initializing OA buffer
        drm/i915/cnl: Fix the CURSOR_COEFF_MASK used in DDI Vswing Programming
        drm/i915/cfl: Fix Workarounds.
        drm/i915: Avoid undefined behaviour of "u32 >> 32"
        drm/i915: reintroduce VLV/CHV PFI programming power domain workaround
        drm/i915: Fix an error checking test
        drm/i915: Disable MSI for all pre-gen5
        drm/i915/gvt: Make function dpy_reg_mmio_readx safe
        drm/i915/gvt: Don't read ADPA_CRT_HOTPLUG_MONITOR from host
        drm/i915/gvt: Set initial PORT_CLK_SEL vreg for BDW
        drm/i915/gvt: Fix inconsistent locks holding sequence
        drm/i915/gvt: Fix possible recursive locking issue
      caa164e3
    • Dave Airlie's avatar
      Merge branch 'mediatek-drm-next-4.13' of... · 39bf0bff
      Dave Airlie authored
      Merge branch 'mediatek-drm-next-4.13' of https://github.com/ckhu-mediatek/linux.git-tags into drm-next
      
      This include new color format support and some fixups.
      
      * 'mediatek-drm-next-4.13' of https://github.com/ckhu-mediatek/linux.git-tags:
        drm/mediatek: separate color module to fixup error memory reallocation
        drm/mediatek: check for memory allocation failure
        drm/mediatek: re-phrase DRM_INFO error message
        drm/mediatek: use platform_register_drivers
        drm/mediatek: Support UYVY and YUYV format for overlay
      39bf0bff
    • Linus Torvalds's avatar
      Merge tag 'modules-for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux · 3a75ad14
      Linus Torvalds authored
      Pull modules updates from Jessica Yu:
       "Summary of modules changes for the 4.13 merge window:
      
         - Minor code cleanups
      
         - Avoid accessing mod struct prior to checking module struct version,
           from Kees
      
         - Fix racy atomic inc/dec logic of kmod_concurrent_max in kmod, from
           Luis"
      
      * tag 'modules-for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
        module: make the modinfo name const
        kmod: reduce atomic operations on kmod_concurrent and simplify
        module: use list_for_each_entry_rcu() on find_module_all()
        kernel/module.c: suppress warning about unused nowarn variable
        module: Add module name to modinfo
        module: Pass struct load_info into symbol checks
      3a75ad14
  2. 12 Jul, 2017 24 commits
    • LABBE Corentin's avatar
      net: stmmac: revert "support future possible different internal phy mode" · d93b07f8
      LABBE Corentin authored
      Since internal phy-mode is reserved for non-xMII protocol we cannot use
      it with dwmac-sun8i.
      Furthermore, all DT patchs which comes with this patch were cleaned, so
      the current state is broken.
      This reverts commit 1c2fa5f8 ("net: stmmac: support future possible different internal phy mode")
      
      Fixes: 1c2fa5f8 ("net: stmmac: support future possible different internal phy mode")
      Signed-off-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d93b07f8
    • Bert Kenward's avatar
      sfc: don't read beyond unicast address list · c70d6815
      Bert Kenward authored
      If we have more than 32 unicast MAC addresses assigned to an interface
      we will read beyond the end of the address table in the driver when
      adding filters. The next 256 entries store multicast addresses, so we
      will end up attempting to insert duplicate filters, which is mostly
      harmless. If we add more than 288 unicast addresses we will then read
      past the multicast address table, which is likely to be more exciting.
      
      Fixes: 12fb0da4 ("sfc: clean fallbacks between promisc/normal in efx_ef10_filter_sync_rx_mode")
      Signed-off-by: default avatarBert Kenward <bkenward@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c70d6815
    • David S. Miller's avatar
      Merge branch 'net-doc-fixes' · 07b8a7cf
      David S. Miller authored
      Stephen Hemminger says:
      
      ====================
      minor net kernel-doc fixes
      
      Fix a couple of small errors in kernel-doc for networking
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      07b8a7cf
    • stephen hemminger's avatar
      datagram: fix kernel-doc comments · d3f6cd9e
      stephen hemminger authored
      An underscore in the kernel-doc comment section has special meaning
      and mis-use generates an errors.
      
      ./net/core/datagram.c:207: ERROR: Unknown target name: "msg".
      ./net/core/datagram.c:379: ERROR: Unknown target name: "msg".
      ./net/core/datagram.c:816: ERROR: Unknown target name: "t".
      Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d3f6cd9e
    • stephen hemminger's avatar
      socket: add documentation for missing elements · 771edcaf
      stephen hemminger authored
      Fill in missing kernel-doc for missing elements in struct sock.
      Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      771edcaf
    • Alexey Khoroshilov's avatar
      smsc911x: Add check for ioremap_nocache() return code · 57fe1479
      Alexey Khoroshilov authored
      There is no check for return code of smsc911x_drv_probe()
      in smsc911x_drv_probe(). The patch adds one.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      57fe1479
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 235b84fc
      Linus Torvalds authored
      Pull i2c updates from Wolfram Sang:
       "This pull request contains:
      
         - i2c core reorganization. One source file became too monolithic. It
           is now split up, yet we still have the same named object as the
           final output. This should ease maintenance.
      
         - new drivers: ZTE ZX2967 family, ASPEED 24XX/25XX
      
         - designware driver gained slave mode support
      
         - xgene-slimpro driver gained ACPI support
      
         - bigger overhaul for pca-platform driver
      
         - the algo-bit module now supports messages with enforced STOP
      
         - slightly bigger than usual set of driver updates and improvements
      
        and with much appreciated quality assurance from Andy Shevchenko"
      
      * 'i2c/for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (51 commits)
        i2c: Provide a stub for i2c_detect_slave_mode()
        i2c: designware: Let slave adapter support be optional
        i2c: designware: Make HW init functions static
        i2c: designware: fix spelling mistakes
        i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus
        i2c: pca-platform: correctly set algo_data.reset_chip
        i2c: acpi: Do not create i2c-clients for LNXVIDEO ACPI devices
        i2c: designware: enable SLAVE in platform module
        i2c: designware: add SLAVE mode functions
        i2c: zx2967: drop COMPILE_TEST dependency
        i2c: zx2967: always use the same device when printing errors
        i2c: pca-platform: use dev_warn/dev_info instead of printk
        i2c: pca-platform: use device managed allocations
        i2c: pca-platform: add devicetree awareness
        i2c: pca-platform: switch to struct gpio_desc
        dt-bindings: add bindings for i2c-pca-platform
        i2c: cadance: fix ctrl/addr reg write order
        i2c: zx2967: add i2c controller driver for ZTE's zx2967 family
        dt: bindings: add documentation for zx2967 family i2c controller
        i2c: algo-bit: add support for I2C_M_STOP
        ...
      235b84fc
    • Linus Torvalds's avatar
      Merge tag 'iommu-updates-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · fb4e3bee
      Linus Torvalds authored
      Pull IOMMU updates from Joerg Roedel:
       "This update comes with:
      
         - Support for lockless operation in the ARM io-pgtable code.
      
           This is an important step to solve the scalability problems in the
           common dma-iommu code for ARM
      
         - Some Errata workarounds for ARM SMMU implemenations
      
         - Rewrite of the deferred IO/TLB flush code in the AMD IOMMU driver.
      
           The code suffered from very high flush rates, with the new
           implementation the flush rate is down to ~1% of what it was before
      
         - Support for amd_iommu=off when booting with kexec.
      
           The problem here was that the IOMMU driver bailed out early without
           disabling the iommu hardware, if it was enabled in the old kernel
      
         - The Rockchip IOMMU driver is now available on ARM64
      
         - Align the return value of the iommu_ops->device_group call-backs to
           not miss error values
      
         - Preempt-disable optimizations in the Intel VT-d and common IOVA
           code to help Linux-RT
      
         - Various other small cleanups and fixes"
      
      * tag 'iommu-updates-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (60 commits)
        iommu/vt-d: Constify intel_dma_ops
        iommu: Warn once when device_group callback returns NULL
        iommu/omap: Return ERR_PTR in device_group call-back
        iommu: Return ERR_PTR() values from device_group call-backs
        iommu/s390: Use iommu_group_get_for_dev() in s390_iommu_add_device()
        iommu/vt-d: Don't disable preemption while accessing deferred_flush()
        iommu/iova: Don't disable preempt around this_cpu_ptr()
        iommu/arm-smmu-v3: Add workaround for Cavium ThunderX2 erratum #126
        iommu/arm-smmu-v3: Enable ACPI based HiSilicon CMD_PREFETCH quirk(erratum 161010701)
        iommu/arm-smmu-v3: Add workaround for Cavium ThunderX2 erratum #74
        ACPI/IORT: Fixup SMMUv3 resource size for Cavium ThunderX2 SMMUv3 model
        iommu/arm-smmu-v3, acpi: Add temporary Cavium SMMU-V3 IORT model number definitions
        iommu/io-pgtable-arm: Use dma_wmb() instead of wmb() when publishing table
        iommu/io-pgtable: depend on !GENERIC_ATOMIC64 when using COMPILE_TEST with LPAE
        iommu/arm-smmu-v3: Remove io-pgtable spinlock
        iommu/arm-smmu: Remove io-pgtable spinlock
        iommu/io-pgtable-arm-v7s: Support lockless operation
        iommu/io-pgtable-arm: Support lockless operation
        iommu/io-pgtable: Introduce explicit coherency
        iommu/io-pgtable-arm-v7s: Refactor split_blk_unmap
        ...
      fb4e3bee
    • Linus Torvalds's avatar
      Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs · 6b1c776d
      Linus Torvalds authored
      Pull overlayfs updates from Miklos Szeredi:
       "This work from Amir introduces the inodes index feature, which
        provides:
      
         - hardlinks are not broken on copy up
      
         - infrastructure for overlayfs NFS export
      
        This also fixes constant st_ino for samefs case for lower hardlinks"
      
      * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: (33 commits)
        ovl: mark parent impure and restore timestamp on ovl_link_up()
        ovl: document copying layers restrictions with inodes index
        ovl: cleanup orphan index entries
        ovl: persistent overlay inode nlink for indexed inodes
        ovl: implement index dir copy up
        ovl: move copy up lock out
        ovl: rearrange copy up
        ovl: add flag for upper in ovl_entry
        ovl: use struct copy_up_ctx as function argument
        ovl: base tmpfile in workdir too
        ovl: factor out ovl_copy_up_inode() helper
        ovl: extract helper to get temp file in copy up
        ovl: defer upper dir lock to tempfile link
        ovl: hash overlay non-dir inodes by copy up origin
        ovl: cleanup bad and stale index entries on mount
        ovl: lookup index entry for copy up origin
        ovl: verify index dir matches upper dir
        ovl: verify upper root dir matches lower root dir
        ovl: introduce the inodes index dir feature
        ovl: generalize ovl_create_workdir()
        ...
      6b1c776d
    • Benjamin Gaignard's avatar
      fbdev: make get_fb_unmapped_area depends of !MMU · 4c99ceda
      Benjamin Gaignard authored
      Even if CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA flag is selected
      do not compile and use get_fb_unmapped_area() if CONFIG_MMU is
      also set. This will avoid mmap errors when compiling multi
      architectures at same time.
      Signed-off-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Noralf Trønnes <noralf@tronnes.org>
      Cc: Emil Velikov <emil.l.velikov@gmail.com>
      Cc: Yannick Fertre <yannick.fertre@st.com>
      Cc: Eric Engestrom <eric.engestrom@imgtec.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      4c99ceda
    • Arnd Bergmann's avatar
      atyfb: hide unused variable · fa43bc2a
      Arnd Bergmann authored
      The vdisplay variable is now only accessed inside of an #ifdef, producing
      a harmless warning:
      
      drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_var_to_crtc':
      drivers/video/fbdev/aty/atyfb_base.c:805:19: error: unused variable 'vdisplay' [-Werror=unused-variable]
      
      This moves the declaration into the ifdef as well.
      
      Fixes: dd7d958a ("video: fbdev: aty: remove useless variable assignments in aty_var_to_crtc()")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      fa43bc2a
    • Al Viro's avatar
      fix a braino in compat_sys_getrlimit() · 58c7ffc0
      Al Viro authored
      Reported-and-tested-by: default avatarMeelis Roos <mroos@linux.ee>
      Fixes: commit d9e968cb "getrlimit()/setrlimit(): move compat to native"
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      58c7ffc0
    • Arend van Spriel's avatar
      brcmfmac: fix possible buffer overflow in brcmf_cfg80211_mgmt_tx() · 8f44c9a4
      Arend van Spriel authored
      The lower level nl80211 code in cfg80211 ensures that "len" is between
      25 and NL80211_ATTR_FRAME (2304).  We subtract DOT11_MGMT_HDR_LEN (24) from
      "len" so thats's max of 2280.  However, the action_frame->data[] buffer is
      only BRCMF_FIL_ACTION_FRAME_SIZE (1800) bytes long so this memcpy() can
      overflow.
      
      	memcpy(action_frame->data, &buf[DOT11_MGMT_HDR_LEN],
      	       le16_to_cpu(action_frame->len));
      
      Cc: stable@vger.kernel.org # 3.9.x
      Fixes: 18e2f61d ("brcmfmac: P2P action frame tx.")
      Reported-by: default avatar"freenerguo(郭大兴)" <freenerguo@tencent.com>
      Signed-off-by: default avatarArend van Spriel <arend.vanspriel@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f44c9a4
    • Lin Yun Sheng's avatar
      net: hns: Bugfix for Tx timeout handling in hns driver · 76b825ab
      Lin Yun Sheng authored
      When hns port type is not debug mode, netif_tx_disable is called
      when there is a tx timeout, which requires system reboot to return
      to normal state. This patch fix this problem by resetting the net
      dev.
      
      Fixes: b5996f11 ("net: add Hisilicon Network Subsystem basic ethernet support")
      Signed-off-by: default avatarLin Yun Sheng <linyunsheng@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      76b825ab
    • Dan Carpenter's avatar
      net: ipmr: ipmr_get_table() returns NULL · 2e3d232e
      Dan Carpenter authored
      The ipmr_get_table() function doesn't return error pointers it returns
      NULL on error.
      
      Fixes: 4f75ba69 ("net: ipmr: Add ipmr_rtm_getroute")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2e3d232e
    • Dan Carpenter's avatar
      nfp: freeing the wrong variable · 88f0f09b
      Dan Carpenter authored
      We accidentally free a NULL pointer and leak the pointer we want to
      free.  Also you can tell from the label name what was intended.  :)
      
      Fixes: abfcdc1d ("nfp: add a stats handler for flower offloads")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      88f0f09b
    • David S. Miller's avatar
      Merge branch 'mlxsw-spectrum-Various-fixes' · da296769
      David S. Miller authored
      Jiri Pirko says:
      
      ====================
      mlxsw: spectrum: Various fixes
      
      First patch adds a missing rollback in error path. Second patch prevents
      a use-after-free during IPv4 route replace. Last two patches fix warnings
      from static checkers.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      da296769
    • Ido Schimmel's avatar
      mlxsw: spectrum_switchdev: Check status of memory allocation · 6f497930
      Ido Schimmel authored
      We can't rely on kzalloc() always succeeding, so check its return value.
      
      Suppresses the following smatch error:
      
      mlxsw_sp_switchdev_event() error: potential null dereference
      'switchdev_work->fdb_info.addr'.  (kzalloc returns
       null)
      
      Fixes: af061378 ("mlxsw: spectrum_switchdev: Add support for learning FDB through notification")
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6f497930
    • Ido Schimmel's avatar
      mlxsw: spectrum_switchdev: Remove unused variable · a9265b80
      Ido Schimmel authored
      Commit 10e23eb2 ("mlxsw: spectrum: Remove support for bypass bridge
      port attributes/vlan set") removed statements that used 'bridge_vlan',
      but didn't remove the variable itself resulting in the following warning
      with W=1:
      
      warning: variable ‘bridge_vlan’ set but not used
      [-Wunused-but-set-variable]
      
      Remove the variable and suppress the warning.
      
      Fixes: 10e23eb2 ("mlxsw: spectrum: Remove support for bypass bridge port attributes/vlan set")
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9265b80
    • Ido Schimmel's avatar
      mlxsw: spectrum_router: Fix use-after-free in route replace · 7387dbbc
      Ido Schimmel authored
      While working on IPv6 route replace I realized we can have a
      use-after-free in IPv4 in case the replaced route is offloaded and the
      only one using its FIB info.
      
      The problem is that fib_table_insert() drops the reference on the FIB
      info of the replaced routes which is eventually freed via call_rcu().
      Since the driver doesn't hold a reference on this FIB info it can cause
      a use-after-free when it tries to clear the RTNH_F_OFFLOAD flag stored
      in fi->fib_flags.
      
      After running the following commands in a loop for enough time with a
      KASAN enabled kernel I finally got the below trace.
      
      $ ip route add 192.168.50.0/24 via 192.168.200.1 dev enp3s0np3
      $ ip route replace 192.168.50.0/24 dev enp3s0np5
      $ ip route del 192.168.50.0/24 dev enp3s0np5
      
      BUG: KASAN: use-after-free in mlxsw_sp_fib_entry_offload_unset+0xa7/0x120 [mlxsw_spectrum]
      Read of size 4 at addr ffff8803717d9820 by task kworker/u4:2/55
      [...]
      ? mlxsw_sp_fib_entry_offload_unset+0xa7/0x120 [mlxsw_spectrum]
      ? mlxsw_sp_fib_entry_offload_unset+0xa7/0x120 [mlxsw_spectrum]
      ? mlxsw_sp_router_neighs_update_work+0x1cd0/0x1ce0 [mlxsw_spectrum]
      ? mlxsw_sp_fib_entry_offload_unset+0xa7/0x120 [mlxsw_spectrum]
      __asan_load4+0x61/0x80
      mlxsw_sp_fib_entry_offload_unset+0xa7/0x120 [mlxsw_spectrum]
      mlxsw_sp_fib_entry_offload_refresh+0xb6/0x370 [mlxsw_spectrum]
      mlxsw_sp_router_fib_event_work+0xd1c/0x2780 [mlxsw_spectrum]
      [...]
      Freed by task 5131:
       save_stack_trace+0x16/0x20
       save_stack+0x46/0xd0
       kasan_slab_free+0x70/0xc0
       kfree+0x144/0x570
       free_fib_info_rcu+0x2e7/0x410
       rcu_process_callbacks+0x4f8/0xe30
       __do_softirq+0x1d3/0x9e2
      
      Fix this by taking a reference on the FIB info when creating the nexthop
      group it represents and drop it when the group is destroyed.
      
      Fixes: 599cf8f9 ("mlxsw: spectrum_router: Add support for route replace")
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7387dbbc
    • Ido Schimmel's avatar
      mlxsw: spectrum_router: Add missing rollback · a4e75b76
      Ido Schimmel authored
      With this patch the error path of mlxsw_sp_nexthop_init() is symmetric
      with mlxsw_sp_nexthop_fini(). Noticed during code review.
      
      Fixes: a8c97014 ("mlxsw: spectrum_router: Refactor nexthop init routine")
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a4e75b76
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 3b06b1a7
      Linus Torvalds authored
      Pull sparc fixes from David Miller:
      
       - Fix symbol version generation for assembler on sparc, from
         Nagarathnam Muthusamy.
      
       - Fix compound page handling in gup_huge_pmd(), from Nitin Gupta.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc64: Fix gup_huge_pmd
        Adding the type of exported symbols
        sed regex in Makefile.build requires line break between exported symbols
        Adding asm-prototypes.h for genksyms to generate crc
      3b06b1a7
    • Yonghong Song's avatar
      samples/bpf: fix a build issue · 53335022
      Yonghong Song authored
      With latest net-next:
      
      ====
      clang  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/6.3.1/include -I./arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h  -Isamples/bpf \
          -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \
          -Wno-compare-distinct-pointer-types \
          -Wno-gnu-variable-sized-type-not-at-end \
          -Wno-address-of-packed-member -Wno-tautological-compare \
          -Wno-unknown-warning-option \
          -O2 -emit-llvm -c samples/bpf/tcp_synrto_kern.c -o -| llc -march=bpf -filetype=obj -o samples/bpf/tcp_synrto_kern.o
      samples/bpf/tcp_synrto_kern.c:20:10: fatal error: 'bpf_endian.h' file not found
                ^~~~~~~~~~~~~~
      1 error generated.
      ====
      
      net has the same issue.
      
      Add support for ntohl and htonl in tools/testing/selftests/bpf/bpf_endian.h.
      Also move bpf_helpers.h from samples/bpf to selftests/bpf and change
      compiler include logic so that programs in samples/bpf can access the headers
      in selftests/bpf, but not the other way around.
      Signed-off-by: default avatarYonghong Song <yhs@fb.com>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarLawrence Brakmo <brakmo@fb.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      53335022
    • Eduardo Valentin's avatar
      bridge: mdb: fix leak on complete_info ptr on fail path · 1bfb1596
      Eduardo Valentin authored
      We currently get the following kmemleak report:
      unreferenced object 0xffff8800039d9820 (size 32):
        comm "softirq", pid 0, jiffies 4295212383 (age 792.416s)
        hex dump (first 32 bytes):
          00 0c e0 03 00 88 ff ff ff 02 00 00 00 00 00 00  ................
          00 00 00 01 ff 11 00 02 86 dd 00 00 ff ff ff ff  ................
        backtrace:
          [<ffffffff8152b4aa>] kmemleak_alloc+0x4a/0xa0
          [<ffffffff811d8ec8>] kmem_cache_alloc_trace+0xb8/0x1c0
          [<ffffffffa0389683>] __br_mdb_notify+0x2a3/0x300 [bridge]
          [<ffffffffa038a0ce>] br_mdb_notify+0x6e/0x70 [bridge]
          [<ffffffffa0386479>] br_multicast_add_group+0x109/0x150 [bridge]
          [<ffffffffa0386518>] br_ip6_multicast_add_group+0x58/0x60 [bridge]
          [<ffffffffa0387fb5>] br_multicast_rcv+0x1d5/0xdb0 [bridge]
          [<ffffffffa037d7cf>] br_handle_frame_finish+0xcf/0x510 [bridge]
          [<ffffffffa03a236b>] br_nf_hook_thresh.part.27+0xb/0x10 [br_netfilter]
          [<ffffffffa03a3738>] br_nf_hook_thresh+0x48/0xb0 [br_netfilter]
          [<ffffffffa03a3fb9>] br_nf_pre_routing_finish_ipv6+0x109/0x1d0 [br_netfilter]
          [<ffffffffa03a4400>] br_nf_pre_routing_ipv6+0xd0/0x14c [br_netfilter]
          [<ffffffffa03a3c27>] br_nf_pre_routing+0x197/0x3d0 [br_netfilter]
          [<ffffffff814a2952>] nf_iterate+0x52/0x60
          [<ffffffff814a29bc>] nf_hook_slow+0x5c/0xb0
          [<ffffffffa037ddf4>] br_handle_frame+0x1a4/0x2c0 [bridge]
      
      This happens when switchdev_port_obj_add() fails. This patch
      frees complete_info object in the fail path.
      Reviewed-by: default avatarVallish Vaidyeshwara <vallish@amazon.com>
      Signed-off-by: default avatarEduardo Valentin <eduval@amazon.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1bfb1596
  3. 11 Jul, 2017 1 commit
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 130568d5
      Linus Torvalds authored
      Pull more block updates from Jens Axboe:
       "This is a followup for block changes, that didn't make the initial
        pull request. It's a bit of a mixed bag, this contains:
      
         - A followup pull request from Sagi for NVMe. Outside of fixups for
           NVMe, it also includes a series for ensuring that we properly
           quiesce hardware queues when browsing live tags.
      
         - Set of integrity fixes from Dmitry (mostly), fixing various issues
           for folks using DIF/DIX.
      
         - Fix for a bug introduced in cciss, with the req init changes. From
           Christoph.
      
         - Fix for a bug in BFQ, from Paolo.
      
         - Two followup fixes for lightnvm/pblk from Javier.
      
         - Depth fix from Ming for blk-mq-sched.
      
         - Also from Ming, performance fix for mtip32xx that was introduced
           with the dynamic initialization of commands"
      
      * 'for-linus' of git://git.kernel.dk/linux-block: (44 commits)
        block: call bio_uninit in bio_endio
        nvmet: avoid unneeded assignment of submit_bio return value
        nvme-pci: add module parameter for io queue depth
        nvme-pci: compile warnings in nvme_alloc_host_mem()
        nvmet_fc: Accept variable pad lengths on Create Association LS
        nvme_fc/nvmet_fc: revise Create Association descriptor length
        lightnvm: pblk: remove unnecessary checks
        lightnvm: pblk: control I/O flow also on tear down
        cciss: initialize struct scsi_req
        null_blk: fix error flow for shared tags during module_init
        block: Fix __blkdev_issue_zeroout loop
        nvme-rdma: unconditionally recycle the request mr
        nvme: split nvme_uninit_ctrl into stop and uninit
        virtio_blk: quiesce/unquiesce live IO when entering PM states
        mtip32xx: quiesce request queues to make sure no submissions are inflight
        nbd: quiesce request queues to make sure no submissions are inflight
        nvme: kick requeue list when requeueing a request instead of when starting the queues
        nvme-pci: quiesce/unquiesce admin_q instead of start/stop its hw queues
        nvme-loop: quiesce/unquiesce admin_q instead of start/stop its hw queues
        nvme-fc: quiesce/unquiesce admin_q instead of start/stop its hw queues
        ...
      130568d5