From: Johannes Berg Date: Thu, 16 Apr 2009 10:15:38 +0000 (+0200) Subject: cfg80211: copy hold when replacing BSS X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=160002fe845218f5789a26954048592c3920ac7b;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git cfg80211: copy hold when replacing BSS When we receive a probe response frame we can replace the BSS struct in our list -- but if that struct is held then we need to hold the new one as well. We really should fix this completely and not replace the struct, but this is a bandaid for now. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 2a00e362f5f..4c77669275e 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -364,6 +364,8 @@ cfg80211_bss_update(struct cfg80211_registered_device *dev, list_replace(&found->list, &res->list); rb_replace_node(&found->rbn, &res->rbn, &dev->bss_tree); + /* XXX: workaround */ + res->hold = found->hold; kref_put(&found->ref, bss_release); found = res; } else if (found) {