1. 14 Jul, 2017 10 commits
  2. 13 Jul, 2017 12 commits
  3. 12 Jul, 2017 18 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>
    • 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>
    • 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>
    • 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>
    • 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>
    • 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>
    • 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
    • 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
    • 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
         - 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()
    • 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>
    • 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
      	memcpy(action_frame->data, &buf[DOT11_MGMT_HDR_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>
    • 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
      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>
    • 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>
    • 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>
    • 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>
    • 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
      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>
    • 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
      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>
    • 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 via dev enp3s0np3
      $ ip route replace dev enp3s0np5
      $ ip route del 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]
      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:
      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>