From nobody Tue Jul 21 20:02:00 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 4h4Svr3Jqkz6mNxl for ; Tue, 21 Jul 2026 20:02:00 +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 4h4Svr1S2Dz3PWb for ; Tue, 21 Jul 2026 20:02:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784664120; 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=16fBVCKmiYadM0OOsNlb0/ja7wd9IrhT9TdVKe+BnRU=; b=lAI9SyaEhiWwneFsME7LFK9sPvS94pI+P2Yef3hNsIXGq1yQacs4wK+1wfbhJdXLE5G9L8 DtpUkspVhUrKSoc95N7HOa5tFByGkf9lKUiUi5olZW/SULLmA7Bl5g9xp4jsKCeCd0Yori 7P/rRtVV87jT4+Xy0lhW8mAfldgoOz/NnkQKGWD/OFjuSWqS9bMcGKd3eEKkTNH28N2QWo BOf5g1M9/zddoEbAV921CQp30OGNh2Y++7YXhg8wyATAGg89TAppZW+YNIbTBJzrjoI9HU We9Z6HbfwJ+aP9EhzR74KIZv66TbWStjDz6THG4uSRSnN8FOAkHLr0rk6BvwRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784664120; a=rsa-sha256; cv=none; b=Xfd7QUZ9ny07jhTvJNgl/spTJLq8vD+8t4CKG/SmRXWfnqHM+GuReqqxfJGGRmNnbDthsy js3H4xYGZFKRsBjZjkC/rbLQ29p2SK78wiB8vVDPgegrCxrTR9ZcV1yz94MliIt1bORI3g hQBao9S70EOnFoimmQey9naejMxJGL/fRQ2qAGniWlqtJAHuIfqZsQU0TbhoAaJGT9Js2s +YzzuDwrCyHw3B7e/mp935PyPRAaAGZxbRJuyx/cVIG5XqTrHulet6lbdTriWejRnzsGA0 KO/M8g93szvS3soDgcxHwAbPIWexC3mkWDOWWL4mrtrPqW78wNXI5UDFXDYcNQ== 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=1784664120; 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=16fBVCKmiYadM0OOsNlb0/ja7wd9IrhT9TdVKe+BnRU=; b=wxvPanxCDdUk2BiAvlHtPecRh7UhXZfWQUPKUORaTgVNEFgaLNy1fo4BlOx09GKq1t+SD1 CKuocTe+nWyHmnjdXmx/ChVflV0T0XXyWyqz4Y3H2Or0b+KmxzPcYk0LJXCoPOWxjQPZyu xz5E067sHlGy0dn8nGmmeHjK8qrKlhcLhphzEwsX0ybsWdnbLARh4n5tSOkIvQliYRLeKC CrOo6TOhu7te3lccwFSYnJyGGTqVXXTxMReWy3LMulmTuIoiQQiREEWwNAE/O3ipQOAUoh DtHfRp7686bXDcRGhLkfbRN3RzKxVDu1uWvGdKvd5pKU7kMdKZhVqRQODTaSZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h4Svr0Mgfz133S for ; Tue, 21 Jul 2026 20:02:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2223f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Jul 2026 20:02:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 5d479b75a894 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 5d479b75a8944faeabb367d1234a9fc3fefa8df1 Auto-Submitted: auto-generated Date: Tue, 21 Jul 2026 20:02:00 +0000 Message-Id: <6a5fd038.2223f.5fbc89af@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5d479b75a8944faeabb367d1234a9fc3fefa8df1 commit 5d479b75a8944faeabb367d1234a9fc3fefa8df1 Author: Bjoern A. Zeeb AuthorDate: 2026-07-21 19:54:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-07-21 20:00:24 +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 MFC after: 3 days --- 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 355d0c160472..bf2054c5efd8 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4522,11 +4522,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;