git: dbc3b1cb4fa6 - main - LinuxKPI: 802.11: no need to lock during lkpi_lsta_alloc()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 22 Apr 2025 20:03:55 UTC
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=dbc3b1cb4fa6d1f9ac7ac1e860179ce1b432cd70 commit dbc3b1cb4fa6d1f9ac7ac1e860179ce1b432cd70 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-22 20:03:31 +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 MFC after: 3 days Reported by: ziaee Tested by: ziaee --- 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 0cd70d63a748..47eb52677cdf 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, ..");