🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
4 messages
4 total messages Started by Mingming Cao Thu, 19 Nov 2026 00:02
[PATCH net-next 0/2] ibmveth: two TX and reset fixes
#18828
Author: Mingming Cao
Date: Thu, 19 Nov 2026 00:02
36 lines
13601 bytes
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/20261109235556.60604-1-mmc@linux.ibm.com/

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)
[PATCH net-next 2/2] ibmveth: do not reopen a device that was set down before reset ran
#18829
Author: Mingming Cao
Date: Thu, 19 Nov 2026 00:02
34 lines
13445 bytes
ibmveth_reset() runs from a work item queued by the RX, poll and
replenish paths. It calls dev_close() and dev_open() without checking
whether the device is still up. If the admin sets the device down
between queueing the work and the work taking rtnl_lock(), dev_close()
does nothing and dev_open() brings the device back up.

Only close and reopen the device if it is running.

Fixes: 2c91e2319ed9 ("net: ibmveth: Reset the adapter when unexpected states are detected")
Signed-off-by: Mingming Cao <mmc@linux.ibm.com>
---
 drivers/net/ethernet/ibm/ibmveth.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
index faacff14841b..34745df8daaa 100644
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -904,8 +904,10 @@ static void ibmveth_reset(struct work_struct *w)
 
 	rtnl_lock();
 
-	dev_close(adapter->netdev);
-	dev_open(adapter->netdev, NULL);
+	if (netif_running(netdev)) {
+		dev_close(netdev);
+		dev_open(netdev, NULL);
+	}
 
 	rtnl_unlock();
 
-- 
2.50.1 (Apple Git-155)
Re: [PATCH net-next 0/2] ibmveth: two TX and reset fixes
#18831
Author: netdev-bot+sinfo
Date: Thu, 19 Nov 2026 00:07
19 lines
8689 bytes
Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - Whether the issue was actually triggered, or is only theoretical
   (e.g. found by LLM and not proven at runtime). If it was triggered
   please include the symptoms, like the stack trace or kernel messages.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.

*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
-- 
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
Re: [PATCH net-next 0/2] ibmveth: two TX and reset fixes
#18866
Author: mingming cao
Date: Thu, 19 Nov 2026 00:29
36 lines
13911 bytes
On 11/18/26 4:07 PM, netdev-bot+sinfo@kernel.org wrote:
> Hi!
>
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
>
>   - Whether the issue was actually triggered, or is only theoretical
>     (e.g. found by LLM and not proven at runtime). If it was triggered
>     please include the symptoms, like the stack trace or kernel messages.
>
> Please do not repost the series just to address the above. Instead,
> reply to this email with the missing information, so that reviewers
> can take it into account.
Thanks.

Some of this context was included in the cover letter, but for reviewers'
convenience:

Both issues were identified during development and review of the ibmveth
multi-queue work. Patch 1 addresses a race when TX queues are reduced via
ethtool -L while traffic is running. Patch 2 addresses a race where a queued
reset can reopen a device that has already been administratively brought 
down.

I could not reproduce either issue directly. The fixes are based on 
analysis of
the existing code paths and rare race conditions. I exercised the affected
scenarios on a PowerVM LPAR, including TX queue reduction under traffic,
ifdown/up during iperf3 traffic, and queued reset testing while the 
device was
being brought down, and observed no regressions with the proposed fixes.

Thanks,
Mingming
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads