Date: Tue, 29 Apr 2025 11:41:42 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: fec21aaf328d - stable/14 - LinuxKPI: 802.11: no need to lock during lkpi_lsta_alloc() Message-ID: <202504291141.53TBfgij045924@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=fec21aaf328d90ffd87f8e508ad19393e555a9d4 commit fec21aaf328d90ffd87f8e508ad19393e555a9d4 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2025-04-22 19:52:19 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2025-04-29 10:49:29 +0000 LinuxKPI: 802.11: no need to lock during lkpi_lsta_alloc() Given upon sta allocation we do not adjust the chanctx in case of mismatch there is not need to lock here. This fixes a problem that upon shutdown net80211 once again can race into here replacing the node from a context where it is holding a lock which does not allow us to hold an sx lock (sleeping thread holds a non-sleepable lock). Sponsored by: The FreeBSD Foundation Reported by: ziaee Tested by: ziaee (cherry picked from commit dbc3b1cb4fa6d1f9ac7ac1e860179ce1b432cd70) --- sys/compat/linuxkpi/common/src/linux_80211.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 84241c2dd89f..f3464f370a13 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -777,9 +777,7 @@ lkpi_lsta_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], sta->deflink.bandwidth = IEEE80211_STA_RX_BW_20; sta->deflink.rx_nss = 1; - wiphy_lock(hw->wiphy); lkpi_sta_sync_from_ni(hw, vif, sta, ni, false); - wiphy_unlock(hw->wiphy); IMPROVE("he, eht, bw_320, ... smps_mode, ..");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504291141.53TBfgij045924>