Article View: linux.kernel.netdev
Article #1459[PATCH net-next v3 7/8] ibmveth: wait for in-flight transmits in ibmveth_close()
From: Mingming Cao
Date: Fri, 09 Oct 2026 18:32
Date: Fri, 09 Oct 2026 18:32
44 lines
10780 bytes
10780 bytes
ibmveth_close() frees the TX buffers after netif_tx_stop_all_queues(),
which does not wait for an ibmveth_start_xmit() already running on
another CPU. That transmit can copy into a freed buffer and hand PHYP
a stale DMA address.
MTU, csum/TSO and buffer pool changes call ibmveth_close() directly
while traffic flows. ifdown and the reset work go through dev_close(),
which waits for running transmits only when the qdisc has an enqueue
function, so with noqueue they race the same way.
Use netif_tx_disable(), which waits for running transmits.
Found by AI-assisted review of the ibmveth multi-queue RX series and
confirmed by code inspection; the race was not reproduced. Tested on a
POWER10 LPAR with MTU changes during a ping flood, with no warnings. No
kernel selftests cover ibmveth.
Fixes: d6832ca48d8a ("ibmveth: Copy tx skbs into a premapped buffer")
Signed-off-by: Mingming Cao <mmc@linux.ibm.com>
---
Changes in v2:
- commit message: dev_close() waits for running transmits only when
the qdisc has an enqueue function, so ifdown and the reset work race
the same way with noqueue
drivers/net/ethernet/ibm/ibmveth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
index 18eb0f27512e..7dec7ca9753b 100644
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -836,7 +836,7 @@ static int ibmveth_close(struct net_device *netdev)
napi_disable(&adapter->napi);
- netif_tx_stop_all_queues(netdev);
+ netif_tx_disable(netdev);
h_vio_signal(adapter->vdev->unit_address, VIO_IRQ_DISABLE);
--
2.50.1 (Apple Git-155)
Technical Details
Message-ID:
<20261009183258.18624-8-mmc@linux.ibm.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343911-linux-kernel-netdev=dewy.ruReferences:
<20261009183258.18624-1-mmc@linux.ibm.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343911-linux-kernel-netdev=dewy.ru
From: mmc@linux.ibm.com (Mingming Cao)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v3 7/8] ibmveth: wait for in-flight transmits in ibmveth_close()
Date: Fri, 9 Oct 2026 11:32:57 -0700
Organization: Usenet Network
Message-ID: <20261009183258.18624-8-mmc@linux.ibm.com>
References: <20261009183258.18624-1-mmc@linux.ibm.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="1173868"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ha5abaeBzqzC/8nHzyBCSz69un4= sha256:WXLkU+u+7Aia1ub7Wq9DR0qMuLD3/r5SWmH19OBLtKA=
sha1:+G6c1BQoV99clQeh0l6sg9qEHyM= sha256:oNv0vLqr2qi89f561JOsurjhdkWcakUXjD8cy9t5l8A=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 70E4610F7A2; Fri, 9 Oct 2026 21:58:40 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.751
X-Spam-Status: No, score=-0.751 tagged_above=-9999 required=6.31
tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=ibm.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id Bc7-jroEQcVj;
Fri, 9 Oct 2026 21:58:37 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-343911-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=linux.ibm.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
by mail.dewy.ru (Postfix) with ESMTPS id 78C7F10F79E; Fri, 9 Oct 2026 21:58:34 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by sto.lore.kernel.org (Postfix) with ESMTP id CEFE161E955; Fri, 9 Oct 2026 18:48:45 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B88C51DAF1;
Fri, 9 Oct 2026 18:33:56 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="Va7PVlwV"
X-Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81FAC522F12;
Fri, 9 Oct 2026 18:33:52 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1791570835; cv=none; b=EJj9h+mnH+vGVpZEsmQ0H8EMH8652Fhunv7EDoh7D8VB1dZO57FKqkZsFQy795ZQ/X1Z+no+uIsPqBNQJwfNkFefMZ6SWgMbht03pSRdJoY9eHbBZxhodwwhHkqiVbagU+0AiXtvlBUhuglcDaWhWtOdKIo6V3zc0yhdBOcgRBc=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1791570835; c=relaxed/simple;
bh=pQ2NgcsCaUjxkX9FDnAMfCJ9PJ+/KgsSHAx5igGK3B4=;
h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
MIME-Version; b=AnUV7Wr7vSKQ7KPudGjH0zLypVnX0fkI+91+XZy3JIJ0x1Ih7EBmQvY5U0gWAcGFPZDDRbvCt6lkbWlqe7nVjzZkKNJmMkXpgFVppimSOB9sct76+wOh1IUxvwnoDhMXAs6ufCN9aWlOwVBgAnmz3BfFkLFNF4rodu5qRGHmkDw=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=Va7PVlwV; arc=none smtp.client-ip=148.163.158.5
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com
X-Received: from pps.filterd (m0360072.ppops.net [127.0.0.1])
by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 699Ha5wn736789;
Fri, 9 Oct 2026 18:33:37 GMT
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc
:content-transfer-encoding:date:from:in-reply-to:message-id
:mime-version:references:subject:to; s=pp1; bh=RSCr+T+GDaBV6ogpj
mxaQdS8wqrdptG1TtxIxVUCskI=; b=Va7PVlwVW4nTIa2YAQ3BCe+CikI2m8LnK
ay2PN4zXwR2RFxnxeT6fIDrQW4CbQoAYQb3AZhi5B4gcCqUkCB3X+gmwj/bFjUX7
aDcmYgbDu2K+zd7BpsUMa8+v3WIi/XVUvdychp/R0+ut13q7RbXol1xedAezdNBm
lmdsKXiF8NAPTpQXggYfOtaZFCVSyJGLZfU4WoAhC4yFp/6EEV1RyH71QfBx8sCa
xZjUPS2DMj05UoQUHhot71DyGO/q1+GHxsP1U/kyRT5t1jZh5vCzgxrGfaCG/qdA
w7uVLvZJb2dY6kfM6Snr1SCkfmldeUzZCjIvwuxIBJr4DiaQHB9hQ==
X-Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4h74tdr914-1
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
Fri, 09 Oct 2026 18:33:36 +0000 (GMT)
X-Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1])
by ppma22.wdc07v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 699HN8kT1169766;
Fri, 9 Oct 2026 18:33:36 GMT
X-Received: from smtprelay02.wdc07v.mail.ibm.com ([172.16.1.69])
by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4h5s351xhd-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Fri, 09 Oct 2026 18:33:36 +0000 (GMT)
X-Received: from smtpav02.dal12v.mail.ibm.com (smtpav02.dal12v.mail.ibm.com [10.241.53.101])
by smtprelay02.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 699IXXJK27984474
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Fri, 9 Oct 2026 18:33:34 GMT
X-Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 960725805F;
Fri, 9 Oct 2026 18:33:33 +0000 (GMT)
X-Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 59E5F58051;
Fri, 9 Oct 2026 18:33:31 +0000 (GMT)
X-Received: from localhost.localdomain (unknown [9.67.110.242])
by smtpav02.dal12v.mail.ibm.com (Postfix) with ESMTP;
Fri, 9 Oct 2026 18:33:31 +0000 (GMT)
X-Cc: maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com,
chleroy@kernel.org, ritesh.list@gmail.com, sshegde@linux.ibm.com,
nnac123@linux.ibm.com, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
horms@kernel.org, davemarq@linux.ibm.com, bjking1@linux.ibm.com
X-Mailer: git-send-email 2.39.3 (Apple Git-146)
X-In-Reply-To: <20261009183258.18624-1-mmc@linux.ibm.com>
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-TM-AS-GCONF: 00
X-Proofpoint-Reinject: loops=2 maxloops=12
X-Authority-Analysis: v=2.4 cv=JL6uIMKb c=1 sm=1 tr=0 ts=6ac93380 cx=c_pps
a=5BHTudwdYE3Te8bg5FgnPg==:117 a=5BHTudwdYE3Te8bg5FgnPg==:17
a=660iZSQnnn4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22
a=RzCfie-kr_QcCd8fBx8p:22 a=VnNF1IyMAAAA:8 a=4X-BtLuwBG46RJIdyTYA:9
X-Proofpoint-ORIG-GUID: ilQ6vN9oyP4AAcnwgN_LKj5Y5tcjOZHe
X-Proofpoint-GUID: -xZRZCmJq8Q_GcIzhmA2KxCdPL1iRx3w
X-Proofpoint-Spam-Info: AW1haW4tMjYxMDA5MDA3MiBTYWx0ZWRfXwQOViEUm+u+A
PUVzr+FGLN2Erg3v+cIq5HISFa6hOiFGFu+GvlPyZCGINHiJpLOFqSQoHZgyfDG1VrKDiUD0osK
LNeQgL3UBdbHP5/XJIPHfBmVqBccRd8=
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDA5MDA3MiBTYWx0ZWRfX8VHWxfTqEyMI
V9a3cgNYUNJcQoqPYnOEHloYp4+SpRRW73NpNfdbjOqgUZgfVbjnb1P1VOjogDDKuJNn1/32imE
NIUwK51XEHHmApfRN0jQ6lcVmFPRUnD8MRsyG5P+MiIMJkkwxHno8Zr7EVpqu+51BvVGRtgD+kS
HjLD6rMoxdfpABzokmbS5gmijSSpNji5/hYbq23lO52jxN7q5LfwZ3b8HBBZBYkZ+bd1kq5WM0N
ZaZFNs77HMfABfdbnKeVzcIQoP5FmYbZ8gh0w6q5Q4VpxAx7c/CFM2/cTUuXOKPC6AaUv1Y/mOE
qviBrGuH/lM0JQpgWzsI7OHkabl7GsRCrvD7+ZSSBeFK0gFl5lbT/4J9t0a5KAKZrWuxh5xjH7P
nP+mGM56iJgbjRlPTiixGV2H8WguD8MPM8SNvyJmWi/VFAq99sQTZLQWHhOz1622UCjlT68Ro8I
eanlvHkXqodEUyQn2Xg==
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49
definitions=2026-10-09_05,2026-10-09_01,2025-10-01_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
suspectscore=0 spamscore=0 bulkscore=0 impostorscore=0 adultscore=0
lowpriorityscore=0 priorityscore=1501 clxscore=1015 malwarescore=0
phishscore=0 classifier=typeunknown authscore=0 authtc= authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610080000
definitions=main-2610090072