]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: cfg80211: make hash table duplicates more survivable
authorJohannes Berg <johannes.berg@intel.com>
Fri, 7 Jun 2024 18:17:17 +0000 (20:17 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 12 Jun 2024 11:04:24 +0000 (13:04 +0200)
commit7f12e26a194d0043441f870708093d9c2c3bad7d
treed9ed370367e8b201fe72ec36a6a92430856be99d
parent5f12dd57a071daf896c00cb4572f2baebbddbb46
wifi: cfg80211: make hash table duplicates more survivable

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>
net/wireless/scan.c