projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f51644
)
cfg80211: scan: drop entry from hidden_list on overflow
author
Johannes Berg
<johannes.berg@intel.com>
Fri, 16 Apr 2021 07:42:14 +0000
(09:42 +0200)
committer
Johannes Berg
<johannes.berg@intel.com>
Mon, 19 Apr 2021 11:25:50 +0000
(13:25 +0200)
If we overflow the maximum number of BSS entries and free the
new entry, drop it from any hidden_list that it may have been
added to in the code above or in cfg80211_combine_bsses().
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link:
https://lore.kernel.org/r/20210416094212.5de7d1676ad7.Ied283b0bc5f504845e7d6ab90626bdfa68bb3dc0@changeid
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c
patch
|
blob
|
history
diff --git
a/net/wireless/scan.c
b/net/wireless/scan.c
index c3b51efff5c69e4fe216be6cfea325f381832057..b21058698a9f48f197258d0026b5f0409aaf5532 100644
(file)
--- a/
net/wireless/scan.c
+++ b/
net/wireless/scan.c
@@
-1751,6
+1751,8
@@
cfg80211_bss_update(struct cfg80211_registered_device *rdev,
if (rdev->bss_entries >= bss_entries_limit &&
!cfg80211_bss_expire_oldest(rdev)) {
+ if (!list_empty(&new->hidden_list))
+ list_del(&new->hidden_list);
kfree(new);
goto drop;
}