* FAILED: Patch "net: arcnet: com20020-pci: fix support for 2.5Mbit cards" failed to apply to 6.18-stable tree
@ 2026-03-01 1:17 Sasha Levin
2026-03-04 7:23 ` Ethan Nelson-Moore
0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2026-03-01 1:17 UTC (permalink / raw)
To: stable, enelsonmoore; +Cc: Simon Horman, Paolo Abeni, netdev
The patch below does not apply to the 6.18-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From c7d9be66b71af490446127c6ffcb66d6bb71b8b9 Mon Sep 17 00:00:00 2001
From: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Date: Thu, 12 Feb 2026 20:55:09 -0800
Subject: [PATCH] net: arcnet: com20020-pci: fix support for 2.5Mbit cards
Commit 8c14f9c70327 ("ARCNET: add com20020 PCI IDs with metadata")
converted the com20020-pci driver to use a card info structure instead
of a single flag mask in driver_data. However, it failed to take into
account that in the original code, driver_data of 0 indicates a card
with no special flags, not a card that should not have any card info
structure. This introduced a null pointer dereference when cards with
no flags were probed.
Commit bd6f1fd5d33d ("net: arcnet: com20020: Fix null-ptr-deref in
com20020pci_probe()") then papered over this issue by rejecting cards
with no driver_data instead of resolving the problem at its source.
Fix the original issue by introducing a new card info structure for
2.5Mbit cards that does not set any flags and using it if no
driver_data is present.
Fixes: 8c14f9c70327 ("ARCNET: add com20020 PCI IDs with metadata")
Fixes: bd6f1fd5d33d ("net: arcnet: com20020: Fix null-ptr-deref in com20020pci_probe()")
Cc: stable@vger.kernel.org
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Link: https://patch.msgid.link/20260213045510.32368-1-enelsonmoore@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
drivers/net/arcnet/com20020-pci.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c
index 19e411b2e3a77..dbadda08dce23 100644
--- a/drivers/net/arcnet/com20020-pci.c
+++ b/drivers/net/arcnet/com20020-pci.c
@@ -115,6 +115,8 @@ static const struct attribute_group com20020_state_group = {
.attrs = com20020_state_attrs,
};
+static struct com20020_pci_card_info card_info_2p5mbit;
+
static void com20020pci_remove(struct pci_dev *pdev);
static int com20020pci_probe(struct pci_dev *pdev,
@@ -140,7 +142,7 @@ static int com20020pci_probe(struct pci_dev *pdev,
ci = (struct com20020_pci_card_info *)id->driver_data;
if (!ci)
- return -EINVAL;
+ ci = &card_info_2p5mbit;
priv->ci = ci;
mm = &ci->misc_map;
@@ -347,6 +349,18 @@ static struct com20020_pci_card_info card_info_5mbit = {
.flags = ARC_IS_5MBIT,
};
+static struct com20020_pci_card_info card_info_2p5mbit = {
+ .name = "ARC-PCI",
+ .devcount = 1,
+ .chan_map_tbl = {
+ {
+ .bar = 2,
+ .offset = 0x00,
+ .size = 0x08,
+ },
+ },
+};
+
static struct com20020_pci_card_info card_info_sohard = {
.name = "SOHARD SH ARC-PCI",
.devcount = 1,
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: FAILED: Patch "net: arcnet: com20020-pci: fix support for 2.5Mbit cards" failed to apply to 6.18-stable tree
2026-03-01 1:17 FAILED: Patch "net: arcnet: com20020-pci: fix support for 2.5Mbit cards" failed to apply to 6.18-stable tree Sasha Levin
@ 2026-03-04 7:23 ` Ethan Nelson-Moore
0 siblings, 0 replies; 2+ messages in thread
From: Ethan Nelson-Moore @ 2026-03-04 7:23 UTC (permalink / raw)
To: Sasha Levin; +Cc: stable, Simon Horman, Paolo Abeni, netdev
Hi, Sasha,
On Sat, Feb 28, 2026 at 5:17 PM Sasha Levin <sashal@kernel.org> wrote:
> The patch below does not apply to the 6.18-stable tree.
This patch applies cleanly to 6.18.15, 6.12.74, 6.6.127, 6.1.164,
5.15.201, and 5.10.251, but I was notified that it failed to apply to
all of these kernels. It is not in the latest git tree for any of
those versions, although my other two "failed" patches have now been
merged. Was 6.18.y perhaps also affected by the <= 6.12.y issue with
the patch with \0 in its subject causing merging to stop?
Am I correct in assuming that the patch did not make it into <= 6.12.y
because patches in those kernels are backported from 6.18.y? This
would mean both 6.18.y and older kernels may be missing other patches,
and they need a new RC.
Ethan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-04 7:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-01 1:17 FAILED: Patch "net: arcnet: com20020-pci: fix support for 2.5Mbit cards" failed to apply to 6.18-stable tree Sasha Levin
2026-03-04 7:23 ` Ethan Nelson-Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox