From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796388717; b=PmoddgSDAnFNwI7OGlYViptyFhbs13PyNhe+R7WrEWvqy5I9C36rl0HpkC/IVH8964ME NYmcsOCgRFEh0t7xmf3bk84tV3CQmOTKYhskrxDJL6Hi/qLfsMAD6rUJ+8hmtLDUEY25s XhR6Sj/om/yhw92bTeQzN63tLUizJTvfPYX5dWs5xaNUqnjGJjBkO7JbSbM/e8nDQnwtR FrQdMKsJ40/uvXFA/p+kX9NNuzzG+YjbK8nEG647r7kwn1uQ/QF1dM60iBjRmhyEwAa23 pTsJd9xO41y3n59mM0uPWows8x+HV4REtPJaTWWq2w4Iuk1aLhwkjOIQXE1/4Hzp0qw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388717; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=RFy9WvwoNaQSzy7IFjB688gfnBWXpeNiJ0xc4Ukd17o=; b=Jos2tqXxTvhWZ0q4yyHO88W8rkTZe0IJrJH9hFMg2/JjtDcguQOn2FtBEYVyYk3Gg3m1 uV+VNhVtiNFOdp9+chtXTl/20ZOhLigG+c9qsCuG6TusYEfhGfcHkoj+IikB8qDw93WPP 7CRQ2GqG6faFBHBjQ6nVbVBuemBGnUH/VJdvFdrUvBFw8hwHkk+nbQN/GkaD2mKDPkjuA hv5BGy/GbwOQcIyKKb2DvNb1+qDPMd8XfLw74JeXRVM2/DLZjnlK0/1AvbFRNp74R2SEp zNcvjdOnGxj1IPxyeK6TQ/zPWZfwaRf2hsrhxXQiCD0WF1bzOfkyuHuTh0VyXcdzVBg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=1BV+f0U3; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 788DC606A33C; Fri, 4 Dec 2026 12:51:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=1BV+f0U3 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0CDF1F0092C; Fri, 4 Dec 2026 12:51:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796388717; bh=RFy9WvwoNaQSzy7IFjB688gfnBWXpeNiJ0xc4Ukd17o=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=1BV+f0U3Qgpx8VC1a0FYlIRtkMdIAebSrRCqiWGQI1+5O/DqGwXhaGDymJ26moTE5 CmvmlpIbSFWYGIQWxqMS7Iyd/XyEHIMQaRaOgvrCaKjrfMn8uLmd+jAYNAC1I7dfDg COHAKZw9KcXnXP7OkakzAPoWd3TZq8jXm5rw1OtQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zhao Li , Johannes Berg , Sasha Levin Subject: [PATCH 6.1 0727/1059] wifi: mac80211_hwsim: ignore non-generic netlink releases Date: Fri, 4 Dec 2026 19:04:18 +0900 Message-ID: <20261204100702.802043619@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zhao Li [ 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. Fixes: 7882513bacb1 ("mac80211_hwsim driver support userspace frame tx/rx") Fixes: e9ed49bf4c2c ("mac80211-hwsim: Add support for HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE") Cc: stable@vger.kernel.org Signed-off-by: Zhao Li Link: https://patch.msgid.link/20261028141751.6728-2-enderaoelyther@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/mac80211_hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 8ebc76cbb0d98..7b076fab1f1d1 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -5412,7 +5412,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); -- 2.53.0