1. 10 10月, 2017 3 次提交
  2. 09 10月, 2017 6 次提交
  3. 04 10月, 2017 1 次提交
  4. 03 10月, 2017 2 次提交
    • P
      mlxsw: spectrum_router: Track RIF of IPIP next hops · de0f43c0
      Petr Machata 提交于
      When considering whether to set RTNH_F_OFFLOAD flag on an IPv6 route,
      mlxsw_sp_fib6_entry_offload_set() looks up the mlxsw_sp_nexthop
      corresponding to a given route, and decides based on whether the next
      hop's offloaded flag was set. When looking for the matching next hop, it
      also takes into account the device of the route, which must match next
      hop's RIF.
      
      IPIP next hops however hitherto didn't set the RIF. As a result, IPv6
      routes forwarding traffic to IP-in-IP netdevices are never marked as
      offloaded, even when they actually are.
      
      Thus track RIF of IPIP next hops the same way as that of ETHERNET next
      hops.
      
      Fixes: 8f28a309 ("mlxsw: spectrum_router: Support IPv6 overlay encap")
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de0f43c0
    • P
      mlxsw: spectrum_router: Move VRF refcounting · 28a04c7b
      Petr Machata 提交于
      When creating a new RIF, bumping RIF count of the containing VR is the
      last thing to be done. Symmetrically, when destroying a RIF, RIF count
      is first dropped and only then the rest of the cleanup proceeds.
      
      That's a problem for loopback RIFs. Those hold two VR references: one
      for overlay and one for underlay. mlxsw_sp_rif_destroy() releases the
      overlay one, and the deconfigure() callback the underlay one. But if
      both overlay and underlay are the same, and if there are no other
      artifacts holding the VR alive, this put actually destroys the VR. Later
      on, when mlxsw_sp_rif_destroy() calls mlxsw_sp_vr_put() for the same VR,
      the VR will already have been released and the kernel crashes with NULL
      pointer dereference.
      
      The underlying problem is that the RIF under destruction ends up
      referencing the overlay VR much longer than it claims: all the way until
      the call to mlxsw_sp_vr_put(). So line up the reference counting
      properly to reflect this. Make corresponding changes in
      mlxsw_sp_rif_create() as well for symmetry.
      
      Fixes: 6ddb7426 ("mlxsw: spectrum_router: Introduce loopback RIFs")
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28a04c7b
  5. 02 10月, 2017 2 次提交
  6. 29 9月, 2017 5 次提交
  7. 28 9月, 2017 11 次提交
  8. 27 9月, 2017 4 次提交
  9. 26 9月, 2017 2 次提交
  10. 24 9月, 2017 2 次提交
    • S
      net: qualcomm: rmnet: Fix rcu splat in rmnet_is_real_dev_registered · 5c346525
      Subash Abhinov Kasiviswanathan 提交于
      Xiaolong reported a suspicious rcu_dereference_check in the device
      unregister notifier callback. Since we do not dereference the
      rx_handler_data, it's ok to just check for the value of the pointer.
      Note that this section is already protected by rtnl_lock.
      
      [  101.364846] WARNING: suspicious RCU usage
      [  101.365654] 4.13.0-rc6-01701-gceed73a2 #1 Not tainted
      [  101.370873] -----------------------------
      [  101.372472] drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c:57 suspicious rcu_dereference_check() usage!
      [  101.374427]
      [  101.374427] other info that might help us debug this:
      [  101.374427]
      [  101.387491]
      [  101.387491] rcu_scheduler_active = 2, debug_locks = 1
      [  101.389368] 1 lock held by trinity-main/2809:
      [  101.390736]  #0:  (rtnl_mutex){+.+.+.}, at: [<8146085b>] rtnl_lock+0xf/0x11
      [  101.395482]
      [  101.395482] stack backtrace:
      [  101.396948] CPU: 0 PID: 2809 Comm: trinity-main Not tainted 4.13.0-rc6-01701-gceed73a2 #1
      [  101.398857] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014
      [  101.401079] Call Trace:
      [  101.401656]  dump_stack+0xa1/0xeb
      [  101.402871]  lockdep_rcu_suspicious+0xc7/0xd0
      [  101.403665]  rmnet_is_real_dev_registered+0x40/0x4e
      [  101.405199]  rmnet_config_notify_cb+0x2c/0x142
      [  101.406344]  ? wireless_nlevent_flush+0x47/0x71
      [  101.407385]  notifier_call_chain+0x2d/0x47
      [  101.408645]  raw_notifier_call_chain+0xc/0xe
      [  101.409882]  call_netdevice_notifiers_info+0x41/0x49
      [  101.411402]  call_netdevice_notifiers+0xc/0xe
      [  101.412713]  rollback_registered_many+0x268/0x36e
      [  101.413702]  rollback_registered+0x39/0x56
      [  101.414965]  unregister_netdevice_queue+0x79/0x88
      [  101.415908]  unregister_netdev+0x16/0x1d
      
      Fixes: ceed73a2 ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation")
      Signed-off-by: NSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
      Reported-by: Nkernel test robot <xiaolong.ye@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5c346525
    • C
      cnic: Fix an error handling path in 'cnic_alloc_bnx2x_resc()' · 05cf97e7
      Christophe JAILLET 提交于
      All the error handling paths 'goto error', except this one.
      We should also go to error in this case, or some resources will be
      leaking.
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05cf97e7
  11. 22 9月, 2017 2 次提交