Skip to contentSkip to conversation

cfg80211: copy hold when replacing BSS

PATCH New Johannes Berg 1 participant 1 message Apr 16, 2009 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 net/wireless/scan.c |    2 ++
 1 file changed, 2 insertions(+)
net/wireless/scan.c +2 -0
@@ -364,6 +364,8 @@ cfg80211_bss_update(struct cfg80211_regi
 		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) {