Two independent bugs in ibmveth that exist on today's kernels.

  1. After ethtool -L shrinks the TX queues, a sender that already
     picked a removed queue (AF_PACKET PACKET_QDISC_BYPASS, pktgen)
     can memcpy into a NULL long-term buffer. Drop that packet, and
     stop TX with netif_tx_disable() so a sender already in xmit is
     done before ethtool -L allocates or frees a buffer.

  2. ibmveth_reset() closes and reopens the device without checking
     whether the admin already set it down, and can bring it back up.
     Skip the reopen if the device is not running.

Both came up during review of the v8 multi-queue series [1]: patch 1
on v8 06/15, patch 2 while splitting that series. They carry Fixes:
tags, but the triggers are narrow and the second multi-queue series
builds on them, so please take them through net-next. The first
pre-multi-queue series, posted separately, does not depend on them.

Tested: PowerVM LPAR. ethtool -L TX shrink under traffic, ifdown/up
under iperf3, and a queued reset while the admin has set the device
down.

[1] https://lore.kernel.org/netdev/[email protected]/

Mingming Cao (2):
  ibmveth: drop TX on a queue whose long term buffer was freed
  ibmveth: do not reopen a device that was set down before reset ran

 drivers/net/ethernet/ibm/ibmveth.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)


base-commit: d6816d9a93b66a12bf01e10037e377f3333ad6cc
-- 
2.50.1 (Apple Git-155)


Reply via email to