From nobody Mon Jul 27 00:10:43 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 4h7fBX19qcz6m9Q6 for ; Mon, 27 Jul 2026 00:10:44 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h7fBW6LwXz43rd for ; Mon, 27 Jul 2026 00:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785111043; 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=IJaIl95hziCI54MayJgS4u3hKrQtvKeKJiGElZkO1aE=; b=HMcuI5H5pfqws0Ydiguk+31SAReta/hXH1oagroqUWaQbkAlbvz7I1lc7ELH1BeNGezl3k odl1fquAGqtlCYi41SdtGA2a/Ocg/2std1cc1dGD/Oxm4OAMGdPFvJD+amf/ZMgyQm3tTT Lw697WlWqR7EzXDdqBiq7+79t2rKxjJEKhRE8fS3oDhtXDS0O8og/Yby4oFDxzcPTzPPps 5j6E3FycLTvdqpjrcBgoOmo070tEydoNSFzlA98wqrmbc07eY1oej/U6v7+U8SmsiuzxYi 7FkllFz0/6QtwPH2gUSaDKLG/WcT+2Id22eRzQ9SIl6bWrNnvgENqMfwgraA1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785111043; a=rsa-sha256; cv=none; b=epBlxRCH3cNeGJSlcrK8xibQTHkASYVwWcQEup/0honYcahXDVXxaXZEUI+fkUtywFCAmo RkW8HGC+I/50prZBoHCA0kTH0W14ka9Fn5W5JfFHlC7R+87y3VVaGe1cwvCUOI3Ecu/lo6 lTxEUcKURC0yU8/PmHmK/LjYRpzAMoJdIMGukr+BazVyUcf7jo1SbK630THdPBnpzrNRBH KUjJQRMuR+EQhaSOEudhm4cjPNn7PhqOl5OCDNxgAczwBeZFDtI7LqCqZRVmZTel6tN7Td PXXUTIZ1nEDMXm5FZrvBfBJZGx53oFObqtMUGT2uYun35BRyKRumLgLTc7KBxA== 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=1785111043; 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=IJaIl95hziCI54MayJgS4u3hKrQtvKeKJiGElZkO1aE=; b=UKaRQbyvVT5TxLQSgOHkR0pEag5KNOFte+U1Mfa0qmDSTNM1SRc53Vd0IxkSpnRvwemLlI LnccYjvWA/nV96yBvYcuNPR/vCxKQ2vE5ltcRkf71k0ZG7lhBRtc0jRBfQ82WAdxOIw8rs EQnc2DAARAIyflcxIv94hB7EYPhEMd/vmfsz6wlp5KD5iiF/CxFpDsEWE0c3JJElEep0sE wkYlB0vuHSB1fp9F7xUqoPhsjNBJtwfepROY0nmewNV78prsXibgMFztn11/Az6A1CCQii Y/wIJ38gUHL3hgCDduGnWPf4/pBzp2JMQvVmnn6zdyfTA0CFl+lV9WBV5NigNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h7fBW5MZCzlMR for ; Mon, 27 Jul 2026 00:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27726 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Jul 2026 00:10:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 94ab8de14f0a - stable/15 - LinuxKPI: 802.11: always lock around (*set_{frag,rts}_threshold) 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 94ab8de14f0a8fd07b3f1e216ec3f42a8d51ccaf Auto-Submitted: auto-generated Date: Mon, 27 Jul 2026 00:10:43 +0000 Message-Id: <6a66a203.27726.234d00b4@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=94ab8de14f0a8fd07b3f1e216ec3f42a8d51ccaf commit 94ab8de14f0a8fd07b3f1e216ec3f42a8d51ccaf Author: Bjoern A. Zeeb AuthorDate: 2026-07-21 19:54:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-07-26 16:48:40 +0000 LinuxKPI: 802.11: always lock around (*set_{frag,rts}_threshold) We would lock the downcalls during normal operation but not during vap (vif) creation as there was no need for locking. Add the missing locking there as drivers seem to always expect it (by assertion) and cannot distinguish between state. Add the assertions to the downcalls as we need both of them locked and both of them can sleep. PR: 296185 ("rtw89(4) freezes the system with INVARIANTS kernel") Debugged by: Artem Bunichev (temcbun gmail.com) Sponsored by: The FreeBSD Foundation (cherry picked from commit 5d479b75a8944faeabb367d1234a9fc3fefa8df1) --- sys/compat/linuxkpi/common/src/linux_80211.c | 2 ++ sys/compat/linuxkpi/common/src/linux_80211_macops.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index df6d7c3158b3..0c649bfcbc80 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4516,11 +4516,13 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], hw->max_listen_interval = 7 * (ic->ic_lintval / ic->ic_bintval); hw->conf.listen_interval = hw->max_listen_interval; + wiphy_lock(hw->wiphy); /* XXX-BZ do we need to be able to update these? */ hw->wiphy->frag_threshold = vap->iv_fragthreshold; lkpi_80211_mo_set_frag_threshold(hw, vap->iv_fragthreshold); hw->wiphy->rts_threshold = vap->iv_rtsthreshold; lkpi_80211_mo_set_rts_threshold(hw, vap->iv_rtsthreshold); + wiphy_unlock(hw->wiphy); /* any others? */ /* Add per-VIF/VAP sysctls. */ diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index b07a2075491b..09199862dfb7 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -115,6 +115,9 @@ lkpi_80211_mo_set_frag_threshold(struct ieee80211_hw *hw, uint32_t frag_th) struct lkpi_hw *lhw; int error; + might_sleep(); + lockdep_assert_wiphy(hw->wiphy); + lhw = HW_TO_LHW(hw); if (lhw->ops->set_frag_threshold == NULL) { error = EOPNOTSUPP; @@ -135,6 +138,9 @@ lkpi_80211_mo_set_rts_threshold(struct ieee80211_hw *hw, uint32_t rts_th) struct lkpi_hw *lhw; int error; + might_sleep(); + lockdep_assert_wiphy(hw->wiphy); + lhw = HW_TO_LHW(hw); if (lhw->ops->set_rts_threshold == NULL) { error = EOPNOTSUPP;