From nobody Sun May 24 14:26:26 2026 X-Original-To: dev-commits-src-all@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 4gNhCX2fMdz6fxSx for ; Sun, 24 May 2026 14:26:32 +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 4gNhCX1KwSz4PTj for ; Sun, 24 May 2026 14:26:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779632792; 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=kmOOr8jT2uYHvfAbIR+v9x6J+nrJLYtrAw3MklBa6SWehgym28PlOxxTr368u47r+CEol0 BtGXtN9jXS61bnJRtIwNGMBJ4uYYzjaXN4E7XLcQFGYs8B8YyhpfnciTPjKkZ3lsLACq4w PxutmOLSkce2RqyL9FbTgDYPYR3CMtjkSt+Q4hlGXYoCJsOzyoQ+rv2rpfDZ/s9oevAfeH FH0AS+E1e2ItYjQMgfg3nXI7Ul+uuUi6oyfH1iFCgMYXb//Gn8lZmOrRRXOmFbOCU47Ysv m7T7N5nep5sRx2rTUsgMT3TNvVA0P6As6IIJCx0SCQXfhC5/1VTpxh/8qIXmOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779632792; a=rsa-sha256; cv=none; b=S1JFF/rWsnKZkdEajR1Jf3sdQihRy6qCbhHq9t+NE9kenEiAC8e1tWJfs0/V3oabkS2u6K T5CrCE4q2nDRO3iHW9TvLuLnuC0Qpc8jJVwDK1wIpASCUhfKY4AUcdBHokCusb6v/SyX3C NUHrkgzjj3iLw/RWr8Yhmw79fVU1ej/09covGJOVoDsstK3859e/4Olyj9S8vUoqJjkiPo f+mpVTGSipaRlfRgoENsq6HG5ypgHvg8elUXgtA96hcjVW79MtGN9UMsway9aOKzyY+BbS Vq/O4fcFc4buugTqEMCIOQ7iXY0EeYOjZa8W9PwzQYzCoDU+EcRr2/5LNlpSqA== 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=1779632792; 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=bOFYAOqFokhObQVmwPEf36rpTNw2pyfiLrTOr1LmW/6cG7fMejBLuxj6kJFgtS7d9BpTca NYbVysOgw6abPgyxGcD6ddQPchCXuWCGjHZxQy4bPasg4aaojeDpRCLRGmeh/tc+cLNAcr Iuu2VGPjdWcTcQCQmX8VZgZosaAoHsfCcWLOH31X0aL5uvLEUWwTmlPWwaM5JlQqRN5983 rBiOV8ngYf4WY9V54jTbnmcEVE7lLN9vwP+LgWW43o5EHUtk3lgPP6jZWYB2pi8be48Ok1 cAT2+Q5eKz7dFfwvUCypZENvNU1ArcOheUQJRTBM+IM0UvmNcZZ2oBo4VYwVPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNhCX002Qzy8V for ; Sun, 24 May 2026 14:26:31 +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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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); } }