1. 10 3月, 2017 34 次提交
  2. 09 3月, 2017 6 次提交
    • J
      mlxsw: spectrum_flower: Remove bogus warns in mlxsw_sp_flower_destroy · 713c43b3
      Jiri Pirko 提交于
      This warnings may be hit even in case they should not - in case user
      puts a TC-flower rule which failed to be offloaded. So just remove them.
      Reported-by: NPetr Machata <petrm@mellanox.com>
      Reported-by: NIdo Schimmel <idosch@mellanox.com>
      Fixes: commit 7aa0f5aa ("mlxsw: spectrum: Implement TC flower offload")
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Acked-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      713c43b3
    • D
      vrf: Fix use-after-free in vrf_xmit · f7887d40
      David Ahern 提交于
      KASAN detected a use-after-free:
      
      [  269.467067] BUG: KASAN: use-after-free in vrf_xmit+0x7f1/0x827 [vrf] at addr ffff8800350a21c0
      [  269.467067] Read of size 4 by task ssh/1879
      [  269.467067] CPU: 1 PID: 1879 Comm: ssh Not tainted 4.10.0+ #249
      [  269.467067] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
      [  269.467067] Call Trace:
      [  269.467067]  dump_stack+0x81/0xb6
      [  269.467067]  kasan_object_err+0x21/0x78
      [  269.467067]  kasan_report+0x2f7/0x450
      [  269.467067]  ? vrf_xmit+0x7f1/0x827 [vrf]
      [  269.467067]  ? ip_output+0xa4/0xdb
      [  269.467067]  __asan_load4+0x6b/0x6d
      [  269.467067]  vrf_xmit+0x7f1/0x827 [vrf]
      ...
      
      Which corresponds to the skb access after xmit handling. Fix by saving
      skb->len and using the saved value to update stats.
      
      Fixes: 193125db ("net: Introduce VRF device driver")
      Signed-off-by: NDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f7887d40
    • J
      team: use ETH_MAX_MTU as max mtu · 3331aa37
      Jarod Wilson 提交于
      This restores the ability to set a team device's mtu to anything higher
      than 1500. Similar to the reported issue with bonding, the team driver
      calls ether_setup(), which sets an initial max_mtu of 1500, while the
      underlying hardware can handle something much larger. Just set it to
      ETH_MAX_MTU to support all possible values, and the limitations of the
      underlying devices will prevent setting anything too large.
      
      Fixes: 91572088 ("net: use core MTU range checking in core net infra")
      CC: Cong Wang <xiyou.wangcong@gmail.com>
      CC: Jiri Pirko <jiri@resnulli.us>
      CC: netdev@vger.kernel.org
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3331aa37
    • D
      net: Revert ksettings conversions. · aac1561a
      David S. Miller 提交于
      Those were supposed to go into the net-next tree not
      the net tree.  Oops...
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aac1561a
    • C
      net: ibm: emac: fix regression caused by emac_dt_phy_probe() · b793f081
      Christian Lamparter 提交于
      Julian Margetson reported a panic on his SAM460EX with Kernel 4.11-rc1:
      | Unable to handle kernel paging request for data at address 0x00000014
      | Oops: Kernel access of bad area, sig: 11 [#1]
      | PREEMPT
      | Canyonlands
      | Modules linked in:
      | CPU: 0 PID: 1 Comm: swapper Not tainted [...]
      | task: ea838000 task.stack: ea836000
      | NIP: c0599f5c LR: c0599dd8 CTR: 00000000
      | REGS: ea837c80 TRAP: 0300   Not tainted [...]
      | MSR: 00029000 <CE,EE,ME>
      |  CR: 24371242  XER: 20000000
      | DEAR: 00000014 ESR: 00000000
      | GPR00: c0599ce8 ea837d30 ea838000 c0e52dcc c0d56ffb [...]
      | NIP [c0599f5c] emac_probe+0xfb4/0x1304
      | LR [c0599dd8] emac_probe+0xe30/0x1304
      | Call Trace:
      | [ea837d30] [c0599ce8] emac_probe+0xd40/0x1304 (unreliable)
      | [ea837d80] [c0533504] platform_drv_probe+0x48/0x90
      | [ea837da0] [c0531c14] driver_probe_device+0x15c/0x2c4
      | [ea837dd0] [c0531e04] __driver_attach+0x88/0xb0
      | ---[ end trace ... ]---
      
      The problem is caused by emac_dt_phy_probe() returing success (0)
      for existing device-trees configurations that do not specify a
      "phy-handle" property. This caused the code to skip the existing
      phy probe and setup. Which led to essential phy related
      data-structures being uninitialized.
      
      This patch also removes the unused variable in emac_dt_phy_connect().
      
      Fixes: a577ca6b ("net: emac: add support for device-tree based PHY discovery and setup")
      Reported-by: NJulian Margetson <runaway@candw.ms>
      Signed-off-by: NChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b793f081
    • P
      net: toshiba: spider_net: use new api ethtool_{get|set}_link_ksettings · 50ad480e
      Philippe Reynes 提交于
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: NPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      50ad480e