Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 1452930F92E for ; Thu, 28 May 2026 07:54:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779954894; cv=none; b=l5JmcPr3RpMMYCtBfZx+37+e00mRGK8JFAO4ln5rlP9RpPmkMD95ct03cyhy+ai+zec1qW2dTGJZrRzS8G117osyEoxMY0lVO5it9ndNxYbhtJpyWA3lpXBPjRAbyWKptsNsGtqg0Dj+DfFiTfM8ZSztVUFd+E4K821vyT9Hf8o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779954894; c=relaxed/simple; bh=7CgPuFm5/dZpjTg8Jsi5f/Z/AQ+M/iM7BfjAgqcAc6o=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=eAmPg1IYUiwCNlQprjnjuYnMzxRMpw9E5G3s0vpLofovhjvbs5hbBx5D0oXrNFXZrWfRz/tBZmYV25H66XdZCBXMjDi00qa4V2zEOOwIxbEphsregRWIC8eE+DhkL7qZQStpXZQwlxZW7TaeJSxnAgB2sWvI/kekruM9o8VeCww= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bqlXX+rJ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="bqlXX+rJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B4B11F000E9; Thu, 28 May 2026 07:54:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779954893; bh=0cy7fTLBTw7C3ZPH9HFqlQp5UwniSuiTf5sqpdDKRpU=; h=Subject:To:Cc:From:Date; b=bqlXX+rJDJdGO34Wf/mNVbFlaEIm4YRX1R9GdVU/9aEwNi6FoC63ZLwiDNdA51Dab 3UrN29tRt04dE2MAVJ05NnY++fqRN/840Ua4Wl589i/5n9mqDUOxQE4ViOHf4EoZXl /wvXaGZwl52arNWZ35sT8LcpfU8Fz6M2D1RuiBMo= Subject: FAILED: patch "[PATCH] net: hsr: defer node table free until after RCU readers" failed to apply to 5.10-stable tree To: michael.bommarito@gmail.com,kuba@kernel.org Cc: From: Date: Thu, 28 May 2026 09:53:44 +0200 Message-ID: <2026052844-wish-motor-9cd5@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-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 . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x aaec7096f9961eb223b5b149abe9495525c205d9 # git commit -s git send-email --to '' --in-reply-to '2026052844-wish-motor-9cd5@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From aaec7096f9961eb223b5b149abe9495525c205d9 Mon Sep 17 00:00:00 2001 From: Michael Bommarito Date: Wed, 13 May 2026 19:38:38 -0400 Subject: [PATCH] net: hsr: defer node table free until after RCU readers HSR node-list and node-status generic-netlink operations run under rcu_read_lock(). They walk hsr->node_db through hsr_get_next_node() and hsr_get_node_data(), but RTM_DELLINK teardown removes the same node table with plain list_del() and frees each node immediately. That lets a generic-netlink reader hold a struct hsr_node pointer across hsr_dellink(). In a KASAN build, widening the reader window after hsr_get_next_node() obtains the node reproduces a slab-use-after-free when the reader copies node->macaddress_A; the freeing stack is hsr_del_nodes() from hsr_dellink(). Use list_del_rcu() and defer the free through the existing hsr_free_node_rcu() callback. This matches the lifetime rule used by the HSR prune paths, which already delete nodes with list_del_rcu() and call_rcu(). Fixes: b9a1e627405d ("hsr: implement dellink to clean up resources") Cc: stable@vger.kernel.org # v5.3+ Signed-off-by: Michael Bommarito Link: https://patch.msgid.link/20260513233838.3064715-2-michael.bommarito@gmail.com Signed-off-by: Jakub Kicinski diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c index 124619920d38..b514e43766ef 100644 --- a/net/hsr/hsr_framereg.c +++ b/net/hsr/hsr_framereg.c @@ -163,8 +163,8 @@ void hsr_del_nodes(struct list_head *node_db) struct hsr_node *tmp; list_for_each_entry_safe(node, tmp, node_db, mac_list) { - list_del(&node->mac_list); - hsr_free_node(node); + list_del_rcu(&node->mac_list); + call_rcu(&node->rcu_head, hsr_free_node_rcu); } }