Article View: linux.kernel.netdev
Article #275[PATCH net-next 0/3] net: use skb_share_check() in loopback selftest hooks
From: Nicolai Buchwitz
Date: Wed, 07 Oct 2026 18:29
Date: Wed, 07 Oct 2026 18:29
34 lines
7223 bytes
7223 bytes
The loopback selftest hooks can get a shared skb when another handler
is bound to the device. Linearizing a non-linear frame then hits
BUG_ON(skb_shared()) in pskb_expand_head().
Stumbled over this on RPi CM4 (bcmgenet, with jumbo series applied +
WIP selftest patches) with a packet socket open at the same time as
running ethtool -t.
stmmac and mlx5 seem to have the same pattern, xgbe already handles
shared skbs. Patches 2 and 3 are compile tested only.
As the impact is pretty limited and doesn't seem to bother anyone in
the wild, I've chosen net-next, but kept the Fixes tags. That matches
what Paolo suggested during the LPC track.
Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
Nicolai Buchwitz (3):
net: selftests: use skb_share_check() in the loopback receive hook
net: stmmac: selftests: use skb_share_check() in the loopback receive hook
net/mlx5e: use skb_share_check() in the loopback selftest hook
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c | 4 ++++
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 2 +-
net/core/selftests.c | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
---
base-commit: 45ad84d2800e4a092fb8d96006a533b2d0ab13f6
change-id: 20261007-nb-net-selftest-shared-net-823dc91ed5bf
Best regards,
--
Nicolai Buchwitz <nb@tipi-net.de>
Technical Details
Message-ID:
<20261007-nb-net-selftest-shared-net-v1-0-458369bfa1ba@tipi-net.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-342457-linux-kernel-netdev=dewy.ruShow 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-342457-linux-kernel-netdev=dewy.ru From: nb@tipi-net.de (Nicolai Buchwitz) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next 0/3] net: use skb_share_check() in loopback selftest hooks Date: Wed, 07 Oct 2026 20:29:21 +0200 Organization: Usenet Network Message-ID: <20261007-nb-net-selftest-shared-net-v1-0-458369bfa1ba@tipi-net.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="710930"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:7rhovfyOuih1xrUEa2884FdnS4s= sha256:FfJBtz55zriQWsDtRGtRB+kxID63mrBr/s+xjjUFTLA= sha1:TZpe3GKmFScFVs0ZZYoPrFrKxTs= sha256:bpprkFUpdf+OcpPkLK6qZvW2BVxqQVYNMGgXZucmAeo= 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 7ADFF10F1F5; Wed, 7 Oct 2026 21:34:26 +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=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-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=tipi-net.de 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 6JQlj-9-wdJX; Wed, 7 Oct 2026 21:34:24 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-342457-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tipi-net.de X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 8269010F1B9; Wed, 7 Oct 2026 21:34:19 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id D2D163B20A; Wed, 7 Oct 2026 18:29:44 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 240E54E0204; Wed, 7 Oct 2026 18:29:44 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.b="uyz4eUp9" X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (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 3CAA84DEC3A; Wed, 7 Oct 2026 18:29:38 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.13.80.246 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791397784; cv=none; b=IDZv19RCFugdhyM3NMdyxJWyzvIb2hx10GzDVVLtgrH61lwbgDHlGqEKvlLetoMj6naUgQ4bbReP0B9YS/NN5L/MLGpBpVwmxUrJ1A4MG8oFPMrWnXCbTESyKbBxvcOZuMUmt0nPYYiao4PLcCNjjJMLV/cpQK7+os382d4JU4g= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791397784; c=relaxed/simple; bh=i9H44DowS6+oasXyh4/SXrZHWueedVWfI+Cxyl6TIXI=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=meZnpOiWe8KCv17kLLNqBWfx4N0xipjaJqYZT1cibBm00tM+YqERkz2zJC5/aWKneyo4xUpR7WiJ/4NxXPZrQfqUlq9QwF63sKcGB4ygETf3wwe0xZcV9xBs9L/Zz/ZtlxvQOhgVygJEzUa0Z+Dw1kILU47W21Vj55pStPSBopk= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.b=uyz4eUp9; arc=none smtp.client-ip=194.13.80.246 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A7906A05A5; Wed, 7 Oct 2026 20:29:28 +0200 (CEST) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1791397776; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding; bh=SDkbcKEg56Hg163LutOTCLb1IktY/aVEl/Io7G5PV78=; b=uyz4eUp9ohF/ZZk0czJGYV9mwV2vkj6EBQeljHKPvD6HA+Xq8NffbjfykVavvpW7xGvAlS prXUHs9fygmzq0JEzpdYTKF9NOIGeyR9DDD7c9aFBqtmXfFCMQwaf81BfqPCrH4IHQXAAX 5N+NaDGU8xnLCMtzqHSsNkR93PHDrkIBB6kEZ3E9vY/Ry8lmVg8iX9vKzF3UujXI5wi+D7 hS+J38JK/VeQNUWZ0EHOWAheD9l/pStKfQBAWW4vMEoeM8TBSdbRfKTjXJ7od6FFkK1dbz 0kt2cqhepQIjIadJe4Fy0vy2pf7VJEhG3ECJUlLtl3FZioIIb+I9MNAygW5+ZQ== 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-B4-Tracking: v=1; b=H4sIAAAAAAAC/yWM2wrCMBBEf6Xss4Ek4vVXpA9NMrErsko2SqH03 03r25yZ4cykKAylazdTwZeVX9LA7TqK4yB3GE6NyVt/dNaejAQjqEbxzBXawjgUpK07+32KF4d 0CJma4F2QedrkN1oPgqlS/1/0Ex6IdXXTsvwAFEg6IIgAAAA= X-Change-ID: 20261007-nb-net-selftest-shared-net-823dc91ed5bf X-Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-rdma@vger.kernel.org, Nicolai Buchwitz <nb@tipi-net.de> X-Mailer: b4 0.16.0 X-Last-TLS-Session-Version: TLSv1.3