]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211/mac80211: fix BSS leaks when abandoning assoc attempts
authorJohannes Berg <johannes.berg@intel.com>
Thu, 8 Dec 2016 16:22:09 +0000 (17:22 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 9 Dec 2016 11:57:49 +0000 (12:57 +0100)
commit38d1adc04ebda046209bab5a17f9d39316e483f1
treed37ebb6de38029d804d0eb6abbe2a495d5de1558
parent1707f4ab2576f46122b33e3bee762fe8f0f84652
cfg80211/mac80211: fix BSS leaks when abandoning assoc attempts

When mac80211 abandons an association attempt, it may free
all the data structures, but inform cfg80211 and userspace
about it only by sending the deauth frame it received, in
which case cfg80211 has no link to the BSS struct that was
used and will not cfg80211_unhold_bss() it.

Fix this by providing a way to inform cfg80211 of this with
the BSS entry passed, so that it can clean up properly, and
use this ability in the appropriate places in mac80211.

This isn't ideal: some code is more or less duplicated and
tracing is missing. However, it's a fairly small change and
it's thus easier to backport - cleanups can come later.

Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
net/mac80211/mlme.c
net/wireless/core.h
net/wireless/mlme.c
net/wireless/sme.c