FAILED: patch "[PATCH] wifi: mac80211_hwsim: ignore non-generic netlink releases" failed to apply to 5.10-stable tree
Subsystems (3)
[email protected]
maintainerThe 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 <[email protected]>.
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 989f47c56e48d442d79497a25ed946d029c4dc53
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026112525-colonist-aide-c6b5@gregkh' --subject-prefix 'PATCH 5.10.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 989f47c56e48d442d79497a25ed946d029c4dc53 Mon Sep 17 00:00:00 2001
From: Zhao Li <[email protected]>
Date: Wed, 28 Oct 2026 22:17:50 +0800
Subject: [PATCH] wifi: mac80211_hwsim: ignore non-generic netlink releases
Closing an unrelated netlink socket can remove mac80211_hwsim radios or clear the active wmediumd registration when its port ID matches a generic netlink socket.
mac80211_hwsim_netlink_notify() handles every NETLINK_URELEASE event, but netlink port IDs are scoped by protocol. The notifier therefore treats a release from another protocol as a MAC80211_HWSIM socket release.
Ignore release notifications unless they come from NETLINK_GENERIC.
LLM assistance was used to find the bug and review.
drivers/net/wireless/virtual/mac80211_hwsim_main.c +1 -1
@@ -7293,7 +7293,7 @@ static int mac80211_hwsim_netlink_notify(struct notifier_block *nb, {struct netlink_notify *notify = _notify; -if (state !=NETLINK_URELEASE ) +if (state !=NETLINK_URELEASE || notify->protocol !=NETLINK_GENERIC )return NOTIFY_DONE ;remove_user_radios (notify->portid,hwsim_net_get_netgroup (notify->net));
Sasha Levin
maintainerPATCH 1/1 wifi: mac80211_hwsim: ignore non-generic netlink releases
From: Zhao Li <[email protected]>
[ Upstream commit 989f47c56e48d442d79497a25ed946d029c4dc53 ]
Closing an unrelated netlink socket can remove mac80211_hwsim radios or clear the active wmediumd registration when its port ID matches a generic netlink socket.
mac80211_hwsim_netlink_notify() handles every NETLINK_URELEASE event, but netlink port IDs are scoped by protocol. The notifier therefore treats a release from another protocol as a MAC80211_HWSIM socket release.
Ignore release notifications unless they come from NETLINK_GENERIC.
LLM assistance was used to find the bug and review.
--- drivers/net/wireless/mac80211_hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mac80211_hwsim.c +1 -1
@@ -4173,7 +4173,7 @@ static int mac80211_hwsim_netlink_notify(struct notifier_block *nb, {struct netlink_notify *notify = _notify; -if (state !=NETLINK_URELEASE ) +if (state !=NETLINK_URELEASE || notify->protocol !=NETLINK_GENERIC )return NOTIFY_DONE ;remove_user_radios (notify->portid);
Signature · 1 line
2.53.0