linux/net/wireless
Johannes Berg 1339615aca wifi: cfg80211: make hash table duplicates more survivable
[ Upstream commit 7f12e26a19 ]

Jiazi Li reported that they occasionally see hash table duplicates
as evidenced by the WARN_ON() in rb_insert_bss() in this code.  It
isn't clear how that happens, nor have I been able to reproduce it,
but if it does happen, the kernel crashes later, when it tries to
unhash the entry that's now not hashed.

Try to make this situation more survivable by removing the BSS from
the list(s) as well, that way it's fully leaked here (as had been
the intent in the hash insert error path), and no longer reachable
through the list(s) so it shouldn't be unhashed again later.

Link: https://lore.kernel.org/r/20231026013528.GA24122@Jiazi.Li
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://msgid.link/20240607181726.36835-2-johannes@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-12 11:07:41 +02:00
..
certs wifi: cfg80211: fix certs build to not depend on file order 2024-01-05 15:13:33 +01:00
.gitignore
ap.c
chan.c
core.c wifi: cfg80211: lock wiphy mutex for rfkill poll 2024-01-25 14:52:27 -08:00
core.h wifi: cfg80211: check wiphy mutex is held for wdev mutex 2024-09-04 13:23:20 +02:00
debugfs.c wifi: cfg80211: debugfs: fix return type in ht40allow_map_read() 2022-09-08 12:28:02 +02:00
debugfs.h
ethtool.c
ibss.c
Kconfig
lib80211_crypt_ccmp.c
lib80211_crypt_tkip.c
lib80211_crypt_wep.c
lib80211.c
Makefile
mesh.c
mlme.c
nl80211.c wifi: cfg80211: restrict NL80211_ATTR_TXQ_QUANTUM values 2024-08-19 05:45:52 +02:00
nl80211.h
ocb.c
of.c
pmsr.c wifi: cfg80211: pmsr: use correct nla_get_uX functions 2024-07-05 09:14:05 +02:00
radiotap.c
rdev-ops.h
reg.c wifi: cfg80211: fix double lock bug in reg_wdev_chan_valid() 2023-06-21 15:59:14 +02:00
reg.h
scan.c wifi: cfg80211: make hash table duplicates more survivable 2024-09-12 11:07:41 +02:00
sme.c wifi: cfg80211: Partial revert "wifi: cfg80211: Fix use after free for wext" 2023-03-13 10:20:37 +01:00
sysfs.c
sysfs.h
trace.c
trace.h wifi: cfg80211: fix the order of arguments for trace events of the tx_rx_evt class 2024-06-16 13:39:13 +02:00
util.c wifi: cfg80211: handle 2x996 RU allocation in cfg80211_calculate_bitrate_he() 2024-08-19 05:44:57 +02:00
wext-compat.c
wext-compat.h
wext-core.c wifi: wext-core: Fix -Wstringop-overflow warning in ioctl_standard_iw_point() 2024-03-01 13:21:55 +01:00
wext-priv.c
wext-proc.c
wext-sme.c
wext-spy.c