From nobody Sun May 24 14:26:26 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNhCR1wWjz6fxND for ; Sun, 24 May 2026 14:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNhCR1JjRz4P6g for ; Sun, 24 May 2026 14:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779632787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DahBNwh1Erk0azZeYmGAClhaknMo/AzA04r3tCbm1aY=; b=KRzj1getnSLMFqBzQQSsYtemKcKkkmEooqc/3W+yI4YkO9T0xLsiMMqqgiygMGQNQcCXLB zJuGbtVUytKA7DSr6lhDJKlvFVugX7hqQy6+47G1YwRrPmyii6EY7aDlDTgxcvA7XAXipT QcHkbHNwJjyKpwAWuL9LVX+KyYp+zpJswOIOU7PpqLsP1m0nDXDr4AhLAsynCYZRWkqern uYg3WsZUbE47rpJrqWinlA2bHyIPsglJEU/b8J5afkklZMAoqf3H8w63bItDdZD4SIWceG 0DKzor1TXU8I+bR9HH66KTJ523EaBqLQJozUPlwIJHMVCZ9bEC0e3OXL0yx7ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779632787; a=rsa-sha256; cv=none; b=WVG9rAR7HPEuAWCCz/hTjygKLvvGuN3Qt0Eepua8Ak7yb3jR5Rptd+SZOWg538eWxhE77w ZAn5YQRf4o2COsaGzaEE+QMRJcSQtLfpHNDv/MqHJchpI7Qtvjm2X4LsNgJ/VSlRnaHHa+ yD+iqVcv+p0pApUsJuldvpB6ll3oaeHiIKb1vKkkK+4EA/SCcCK9txUimgp5F9iY+gHZwq UQFmuCAGSgFpgp0XGArCVmN1as394W2C/jeBv482czSmZxdmf2CjTGPe3KUdDX1hxYXMNZ s4GfjQfiNIYwmZrBL8jv3xEc94XtvNsyMvbwukJRir0RYLdw2nUUxMa8L7j2CQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779632787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DahBNwh1Erk0azZeYmGAClhaknMo/AzA04r3tCbm1aY=; b=v9lKqZFeLDnahjkmQBYkgn18leMIJf6eN77yhn6peNyP6K0lwA4r32sAKgvmxYwZAsAKgM CSPuurk2ZH6OzyvVZh9cpDFhfBZxhEFkA1oSj23lW5KOt2NloA/X5IomIYF30Atq9sDzxT C2m/qd4hgGVUp39bPWwbdgAPobqZf1liIQ6y2fWZON1fR6zMCIPcHy7QZgZFkISfqNxKN/ Nk68ILqWjDLKd/+K8zMMVxwbwnlqSvPWJB8qiyBmG/zk+RPEG65pJlVJP9MATo1oBEA63+ nesON1b+2wdXi6lGjPgEWTGwbP+HyKS6qaUK3NbGlpb3cugkvY1gi5lwpM4njg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNhCR017dzyDf for ; Sun, 24 May 2026 14:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1dc0e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 24 May 2026 14:26:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 8ead19207e56 - main - LinuxKPI: 802.11: reset chanctx when recycling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ead19207e56790bd4c64dba4ddbf2e0eb6922f7 Auto-Submitted: auto-generated Date: Sun, 24 May 2026 14:26:26 +0000 Message-Id: <6a130a92.1dc0e.52a5a676@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8ead19207e56790bd4c64dba4ddbf2e0eb6922f7 commit 8ead19207e56790bd4c64dba4ddbf2e0eb6922f7 Author: Bjoern A. Zeeb AuthorDate: 2026-05-23 21:06:32 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-05-23 23:54:30 +0000 LinuxKPI: 802.11: reset chanctx when recycling When we no longer need a channel context and put it back on the reserved list, zero it for all but the vif so that we get the same state as if it was freshly allocated. Sponsored by: The FreeBSD Foundation Fixes: e62c92c0a5cf, 88cb1e17f471 MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index b9528295ad8e..efd1d9bae3cc 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2426,6 +2426,8 @@ lkpi_set_chanctx_conf(struct ieee80211_hw *hw, struct ieee80211_vif *vif, rcu_assign_pointer(vif->bss_conf.chanctx_conf, NULL); lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); list_del(&lchanctx->entry); + memset(lchanctx, 0, sizeof(*lchanctx)); + lchanctx->lvif = VIF_TO_LVIF(vif); list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); } @@ -2460,6 +2462,8 @@ lkpi_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif) lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); list_del(&lchanctx->entry); lhw = HW_TO_LHW(hw); + memset(lchanctx, 0, sizeof(*lchanctx)); + lchanctx->lvif = VIF_TO_LVIF(vif); list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); } @@ -6806,6 +6810,7 @@ linuxkpi_ieee80211_iffree(struct ieee80211_hw *hw) lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); } list_del(&lchanctx->entry); + /* No need to reset the lchanctx here as we will free it below. */ list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); } }