From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2111125228C; Sun, 1 Mar 2026 01:29:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772328561; cv=none; b=KUlazaTi1O1GqNDXAGKoH+glkrmnmzw3ZHUCn7F6Nq1InrX4SzDwvOmqu5MRFt0bT8mqejG3EqaUvz9Q2hjVXwptFvv6rBbNZ1LDIAkt/6qduvzc7BNLsG01zl78f0gA8fFwMe0JQfUd8D7LHk5kHGnLF8rQImlyNF84XUN5ArA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772328561; c=relaxed/simple; bh=iLlWlm0a5I+knnaxhS9qVL6DlR+uTJ7+tJP19yUA6I8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TvKFCYIBH2heMHIs+fbJk/jSTFy0BJl1868qX8n+tESq/Km1b0PV0NnrfPKi3Kwh1D8xzX3HLJXrCBsEErqiOwZ0oIIr8gYp3M1stdLPOJGzKPEPgepd1HUCGflp9zN6kyWJ1Q825nGq3F4WKWzGjdlTYVGYRR7lDhtYQlA8YpY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BkRMak02; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BkRMak02" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62AE3C19421; Sun, 1 Mar 2026 01:29:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772328561; bh=iLlWlm0a5I+knnaxhS9qVL6DlR+uTJ7+tJP19yUA6I8=; h=From:To:Cc:Subject:Date:From; b=BkRMak02tRGbSDe7J60799Rh4CD+7Z3t+/xxdK26w2LxDUhFIpO3LGjBKd4Y0Ygd+ mhsc3sY9m0axdn+Rn8ARidmYqVh2HSU+cEXlJclPcPG5Don0ennausAnXjhVul/ubu aG5qiwDR5OthxYv+hghrb+GgwXOsffN3HT8Z54dTMZh4A7yKTZOddmgwlWcog2c+xj y/axU95nuUPeyCe++8h3DbYax1899ycfixzedl8fBA+uXRKGNP5ODRCXQX7uTiOYTm yJxXSPFLV3v2AUo6dxyLLZye3ERB0YF91+fG9afn5uY0aabUqzeh5MZ8wjir2Bm7g5 vk4ZUQlTrnhTw== From: Sasha Levin To: stable@vger.kernel.org, enelsonmoore@gmail.com Cc: Simon Horman , Paolo Abeni , netdev@vger.kernel.org Subject: FAILED: Patch "net: arcnet: com20020-pci: fix support for 2.5Mbit cards" failed to apply to 6.12-stable tree Date: Sat, 28 Feb 2026 20:29:18 -0500 Message-ID: <20260301012919.1687040-1-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Hint: ignore X-stable: review Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-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 . Thanks, Sasha ------------------ original commit in Linus's tree ------------------ >From c7d9be66b71af490446127c6ffcb66d6bb71b8b9 Mon Sep 17 00:00:00 2001 From: Ethan Nelson-Moore 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 Signed-off-by: Ethan Nelson-Moore Link: https://patch.msgid.link/20260213045510.32368-1-enelsonmoore@gmail.com Signed-off-by: Paolo Abeni --- 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