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=1796385519; b=ocgBhQksRS4+QM1lD108ZpMctMC81MrY8ZgB/02tt7XPimXo9fuPwqE71O40+2uQrYUe +nDPpMmqXWwyLi8nDgFJOsFPDVrDsc93n4bcMJd6mdnakx1cex5oeJsKFrONFwnVVdbnS s7Zhb0f0rsTmb6MDoC7RjP8b2tJBmWzXRTjPxceexRwZsX4Gl9zmIFVqfTlEstK8y+Ztm P0dnKlim5nMLFir4nW4ieN57QUtn5ht1VXhb47ktZd1v9N6K9FpGmbDlQn+VQqimFz2qP aLFygw8y9h3lo0I8Hj6xFCbfUtrXb5sL2nHzqKKJbpRjeG7QufFQC45oZJc5fpeDagw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385519; 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=V69RQyanI5oEOCczyMDffF99d6P/dZrIV+h8LEbDRQ0=; b=p3esnxvTD8zMvSy8Y/QX7hXWdsAKZ0RgIth11M3R/vCF/akj8gGreeRmf+SlLO/JUYNu AFIsHRrZ7DizPW5xArGEjHkzBWp9prR9uDuhZKHhYo8/Eb20I8QTd4rachfFvUoEnk9eX 86Q6428HvjnXP1XsRazqHVRX/8HwU2NB84qR68zDpJRgq8UMHbyWTdeKKT1qO/YxfRFP+ gpkck0hnJugI2loGe/rkzPCBv5fnq+CKHr5m9t3uFUsMS+tM+QnAq0oJGHkr81ZFGIlL8 rJLs7CdSZIp5Ssut4BqCidQUnhg5aW5LZZEGEj1VqTuajZj97E132cfTQt5JFbtY3VQ== 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=k+qzKFT+; 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 CA218606A33C; Fri, 4 Dec 2026 11:58:39 +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=k+qzKFT+ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46A831F00931; Fri, 4 Dec 2026 11:58:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385519; bh=V69RQyanI5oEOCczyMDffF99d6P/dZrIV+h8LEbDRQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=k+qzKFT+I+eYW01Ght1wjZLpshh5NwjwLxnt/CggvdEN1GCbVstHu4fxCI8ENSc7q xvP+8ftToh7sC+EOiOlKFhMnXqL93OdcEWBXIshVL7K48E06ZvKhknpmAFlNi8A8hE uK7kfXAnaZNeOk5gbeG6Gn2vsaVw7ly5l/DRm9M4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zhao Li , Johannes Berg Subject: [PATCH 6.6 0583/1167] wifi: mac80211: restore dormant links when link updates fail Date: Fri, 4 Dec 2026 19:00:10 +0900 Message-ID: <20261204100717.236621268@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@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.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zhao Li commit bb22f3b2d8f8a2f883944f24678cf84e18b162e8 upstream. A failed MLO link update can leave the interface with the requested dormant-links bitmap instead of its previous one. This can disable active links or trigger a bitmap warning during rollback. The error path restores the old valid-links bitmap but passes the new dormant_links argument to ieee80211_set_vif_links_bitmaps(). Save the old dormant bitmap before changing link state and use it when restoring the old configuration. LLM assistance was used to find the bug and review. Fixes: 6d543b34dbcf ("wifi: mac80211: Support disabled links during association") Cc: stable@vger.kernel.org Signed-off-by: Zhao Li Link: https://patch.msgid.link/20261028142123.13072-1-enderaoelyther@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- net/mac80211/link.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/mac80211/link.c +++ b/net/mac80211/link.c @@ -199,6 +199,7 @@ static int ieee80211_vif_update_links(st { u16 old_links = sdata->vif.valid_links; u16 old_active = sdata->vif.active_links; + u16 old_dormant = sdata->vif.dormant_links; unsigned long add = new_links & ~old_links; unsigned long rem = old_links & ~new_links; unsigned int link_id; @@ -287,7 +288,7 @@ static int ieee80211_vif_update_links(st /* restore config */ memcpy(sdata->link, old_data, sizeof(old_data)); memcpy(sdata->vif.link_conf, old, sizeof(old)); - ieee80211_set_vif_links_bitmaps(sdata, old_links, dormant_links); + ieee80211_set_vif_links_bitmaps(sdata, old_links, old_dormant); /* drain RCU readers before cancelling work they may queue */ synchronize_rcu(); for_each_set_bit(link_id, &add, IEEE80211_MLD_MAX_NUM_LINKS) {