android_kernel_xiaomi_sm8450/net/wireless
Johannes Berg 0305a885cc wifi: cfg80211: make hash table duplicates more survivable
[ Upstream commit 7f12e26a194d0043441f870708093d9c2c3bad7d ]

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:06:41 +02:00
..
certs wifi: cfg80211: fix certs build to not depend on file order 2024-01-05 15:12:27 +01:00
.gitignore
ap.c
chan.c cfg80211: only allow S1G channels on S1G band 2020-10-08 10:41:24 +02:00
core.c cfg80211: set custom regdomain after wiphy registration 2022-06-06 08:42:41 +02:00
core.h cfg80211: fix management registrations locking 2021-11-02 19:48:20 +01:00
debugfs.c wifi: cfg80211: debugfs: fix return type in ht40allow_map_read() 2022-09-08 11:11:36 +02:00
debugfs.h
ethtool.c
ibss.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
Kconfig cfg80211: select CONFIG_CRC32 2021-01-19 18:27:28 +01:00
lib80211_crypt_ccmp.c
lib80211_crypt_tkip.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
lib80211_crypt_wep.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
lib80211.c lib80211: Remove unused macro DRV_NAME 2020-09-18 11:53:00 +02:00
Makefile cfg80211: make certificate generation more robust 2021-06-23 14:42:53 +02:00
mesh.c cfg80211/mac80211: add mesh_param "mesh_nolearn" to skip path discovery 2020-07-31 09:24:23 +02:00
mlme.c cfg80211: fix management registrations locking 2021-11-02 19:48:20 +01:00
nl80211.c wifi: cfg80211: restrict NL80211_ATTR_TXQ_QUANTUM values 2024-08-19 05:41:23 +02:00
nl80211.h
ocb.c
of.c
pmsr.c wifi: cfg80211: pmsr: use correct nla_get_uX functions 2024-07-05 09:12:21 +02:00
radiotap.c wireless: radiotap: fix some kernel-doc 2020-09-28 13:53:05 +02:00
rdev-ops.h
reg.c wifi: cfg80211: Fix not unregister reg_pdev when load_builtin_regdb_keys() fails 2023-01-14 10:15:36 +01:00
reg.h
scan.c wifi: cfg80211: make hash table duplicates more survivable 2024-09-12 11:06:41 +02:00
sme.c wifi: cfg80211: Partial revert "wifi: cfg80211: Fix use after free for wext" 2023-03-13 10:19:36 +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:32:00 +02:00
util.c wifi: cfg80211: handle 2x996 RU allocation in cfg80211_calculate_bitrate_he() 2024-08-19 05:40:46 +02:00
wext-compat.c net: wireless: Convert to use the preferred fallthrough macro 2020-08-27 11:24:28 +02:00
wext-compat.h
wext-core.c wifi: wext-core: Fix -Wstringop-overflow warning in ioctl_standard_iw_point() 2023-07-27 08:44:38 +02:00
wext-priv.c
wext-proc.c
wext-sme.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
wext-spy.c wireless: wext-spy: Fix out-of-bounds warning 2021-07-19 09:44:52 +02:00