Skip to content

ibmveth: two TX and reset fixes

Mingming Cao linuxppc-dev netdev 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- 1/2: wake the TX queues under netif_tx_lock_bh(), and map a new long-term buffer before publishing its pointer (Sashiko)
- 2/2: say the bug was found during review and was not reproduced

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ibmveth: drop TX on a queue whose long term buffer was freeddrivers/net/ethernet/ibm/ibmveth.c+26 -110 replies
2/2ibmveth: do not reopen a device that was set down before reset randrivers/net/ethernet/ibm/ibmveth.c+4 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH net-next v2 0/2] ibmveth: two TX and reset fixes

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. Neither was reproduced; the fixes are based on analysis of the code paths, and each commit message says so. 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 multi-queue series, posted separately, does not depend on them.

Tested: on a PowerVM LPAR: ethtool -L TX shrink under traffic, ifdown/up under iperf3, and a queued reset while the admin has set the device down. v2 on QEMU pseries only: TX shrink and restore under UDP traffic, MTU change, open/close churn.

Changes in v2:
- 1/2: wake the TX queues under netif_tx_lock_bh(), and map a new long-term buffer before publishing its pointer (Sashiko)
- 2/2: say the bug was found during review and was not reproduced

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

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