1. 28 Feb, 2022 3 commits
    • Casper Andersson's avatar
      net: sparx5: Add #include to remove warning · 90d40252
      Casper Andersson authored
      main.h uses NUM_TARGETS from main_regs.h, but
      the missing include never causes any errors
      because everywhere main.h is (currently)
      included, main_regs.h is included before.
      But since it is dependent on main_regs.h
      it should always be included.
      Signed-off-by: default avatarCasper Andersson <casper.casan@gmail.com>
      Reviewed-by: default avatarJoacim Zetterling <joacim.zetterling@westermo.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90d40252
    • Tony Lu's avatar
      net/smc: Fix cleanup when register ULP fails · 4d08b7b5
      Tony Lu authored
      This patch calls smc_ib_unregister_client() when tcp_register_ulp()
      fails, and make sure to clean it up.
      
      Fixes: d7cd421d ("net/smc: Introduce TCP ULP support")
      Signed-off-by: default avatarTony Lu <tonylu@linux.alibaba.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4d08b7b5
    • j.nixdorf@avm.de's avatar
      net: ipv6: ensure we call ipv6_mc_down() at most once · 9995b408
      j.nixdorf@avm.de authored
      There are two reasons for addrconf_notify() to be called with NETDEV_DOWN:
      either the network device is actually going down, or IPv6 was disabled
      on the interface.
      
      If either of them stays down while the other is toggled, we repeatedly
      call the code for NETDEV_DOWN, including ipv6_mc_down(), while never
      calling the corresponding ipv6_mc_up() in between. This will cause a
      new entry in idev->mc_tomb to be allocated for each multicast group
      the interface is subscribed to, which in turn leaks one struct ifmcaddr6
      per nontrivial multicast group the interface is subscribed to.
      
      The following reproducer will leak at least $n objects:
      
      ip addr add ff2e::4242/32 dev eth0 autojoin
      sysctl -w net.ipv6.conf.eth0.disable_ipv6=1
      for i in $(seq 1 $n); do
      	ip link set up eth0; ip link set down eth0
      done
      
      Joining groups with IPV6_ADD_MEMBERSHIP (unprivileged) or setting the
      sysctl net.ipv6.conf.eth0.forwarding to 1 (=> subscribing to ff02::2)
      can also be used to create a nontrivial idev->mc_list, which will the
      leak objects with the right up-down-sequence.
      
      Based on both sources for NETDEV_DOWN events the interface IPv6 state
      should be considered:
      
       - not ready if the network interface is not ready OR IPv6 is disabled
         for it
       - ready if the network interface is ready AND IPv6 is enabled for it
      
      The functions ipv6_mc_up() and ipv6_down() should only be run when this
      state changes.
      
      Implement this by remembering when the IPv6 state is ready, and only
      run ipv6_mc_down() if it actually changed from ready to not ready.
      
      The other direction (not ready -> ready) already works correctly, as:
      
       - the interface notification triggered codepath for NETDEV_UP /
         NETDEV_CHANGE returns early if ipv6 is disabled, and
       - the disable_ipv6=0 triggered codepath skips fully initializing the
         interface as long as addrconf_link_ready(dev) returns false
       - calling ipv6_mc_up() repeatedly does not leak anything
      
      Fixes: 3ce62a84 ("ipv6: exit early in addrconf_notify() if IPv6 is disabled")
      Signed-off-by: default avatarJohannes Nixdorf <j.nixdorf@avm.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9995b408
  2. 26 Feb, 2022 1 commit
    • David S. Miller's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · 519ca6fa
      David S. Miller authored
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2022-02-25
      
      This series contains updates to iavf driver only.
      
      Slawomir fixes stability issues that can be seen when stressing the
      driver using a large number of VFs with a multitude of operations.
      Among the fixes are reworking mutexes to provide more effective locking,
      ensuring initialization is complete before teardown, preventing
      operations which could race while removing the driver, stopping certain
      tasks from being queued when the device is down, and adding a missing
      mutex unlock.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      519ca6fa
  3. 25 Feb, 2022 35 commits
  4. 24 Feb, 2022 1 commit