diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-11-28 16:14:56 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-11-30 07:41:24 -0500 |
commit | b629ea3db4c0da4465ffa532914e4a3081f93cdf (patch) | |
tree | bbebaf3d20ded0b389a83458571734c2595a29b4 /net/wireless/scan.c | |
parent | 41e31b8b902397d5d507b275050fcbe8adaf4ff4 (diff) |
cfg80211: don't BUG_ON BSS struct issues
There's no need to stop the machine, just leak
the BSS entry if there's an issue with its hold
counter when freeing.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r-- | net/wireless/scan.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 9596015975d2..5af431f2f90a 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -26,6 +26,10 @@ static void bss_release(struct kref *ref) | |||
26 | struct cfg80211_internal_bss *bss; | 26 | struct cfg80211_internal_bss *bss; |
27 | 27 | ||
28 | bss = container_of(ref, struct cfg80211_internal_bss, ref); | 28 | bss = container_of(ref, struct cfg80211_internal_bss, ref); |
29 | |||
30 | if (WARN_ON(atomic_read(&bss->hold))) | ||
31 | return; | ||
32 | |||
29 | if (bss->pub.free_priv) | 33 | if (bss->pub.free_priv) |
30 | bss->pub.free_priv(&bss->pub); | 34 | bss->pub.free_priv(&bss->pub); |
31 | 35 | ||
@@ -34,8 +38,6 @@ static void bss_release(struct kref *ref) | |||
34 | if (bss->proberesp_ies_allocated) | 38 | if (bss->proberesp_ies_allocated) |
35 | kfree(bss->pub.proberesp_ies); | 39 | kfree(bss->pub.proberesp_ies); |
36 | 40 | ||
37 | BUG_ON(atomic_read(&bss->hold)); | ||
38 | |||
39 | kfree(bss); | 41 | kfree(bss); |
40 | } | 42 | } |
41 | 43 | ||