Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] cfg80211: fix BSS double-unlinking (continued)
@ 2011-03-28  7:11 juuso.oikarinen
  2011-03-28 10:57 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: juuso.oikarinen @ 2011-03-28  7:11 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

From: Juuso Oikarinen <juuso.oikarinen@nokia.com>

This patch adds to the fix "fix BSS double-unlinking"
(commit 3207390a8b58bfc1335750f91cf6783c48ca19ca) by Johannes Berg.

It turns out, that the double-unlinking scenario can also occur if expired
BSS elements are removed whilst an interface is performing association.

To work around that, replace list_del with list_del_init also in the
"cfg80211_bss_expire" function, so that the check for whether the BSS still is
in the list works correctly in cfg80211_bss_expire.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
---
 net/wireless/scan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index ea427f4..2823615 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -134,7 +134,7 @@ void cfg80211_bss_expire(struct cfg80211_registered_device *dev)
 			continue;
 		if (!time_after(jiffies, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE))
 			continue;
-		list_del(&bss->list);
+		list_del_init(&bss->list);
 		rb_erase(&bss->rbn, &dev->bss_tree);
 		kref_put(&bss->ref, bss_release);
 		expired = true;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-28 11:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28  7:11 [PATCH] cfg80211: fix BSS double-unlinking (continued) juuso.oikarinen
2011-03-28 10:57 ` Johannes Berg
2011-03-28 11:04   ` Juuso Oikarinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox