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>
This commit is contained in:
parent
41e31b8b90
commit
b629ea3db4
1 changed files with 4 additions and 2 deletions
|
@ -26,6 +26,10 @@ static void bss_release(struct kref *ref)
|
||||||
struct cfg80211_internal_bss *bss;
|
struct cfg80211_internal_bss *bss;
|
||||||
|
|
||||||
bss = container_of(ref, struct cfg80211_internal_bss, ref);
|
bss = container_of(ref, struct cfg80211_internal_bss, ref);
|
||||||
|
|
||||||
|
if (WARN_ON(atomic_read(&bss->hold)))
|
||||||
|
return;
|
||||||
|
|
||||||
if (bss->pub.free_priv)
|
if (bss->pub.free_priv)
|
||||||
bss->pub.free_priv(&bss->pub);
|
bss->pub.free_priv(&bss->pub);
|
||||||
|
|
||||||
|
@ -34,8 +38,6 @@ static void bss_release(struct kref *ref)
|
||||||
if (bss->proberesp_ies_allocated)
|
if (bss->proberesp_ies_allocated)
|
||||||
kfree(bss->pub.proberesp_ies);
|
kfree(bss->pub.proberesp_ies);
|
||||||
|
|
||||||
BUG_ON(atomic_read(&bss->hold));
|
|
||||||
|
|
||||||
kfree(bss);
|
kfree(bss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue