]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
mac80211: fix missing sta_lock in __sta_info_destroy
authorJohannes Berg <johannes.berg@intel.com>
Tue, 6 Sep 2011 10:47:39 +0000 (12:47 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 Sep 2011 18:18:38 +0000 (14:18 -0400)
Since my commit 34e895075e21be3e21e71d6317440d1ee7969ad0
("mac80211: allow station add/remove to sleep") there is
a race in mac80211 when it clears the TIM bit because a
sleeping station disconnected, the spinlock isn't held
around the relevant code any more. Use the right API to
acquire the spinlock correctly.

Cc: stable@kernel.org [2.6.34+]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/sta_info.c

index 3db78b696c5ce4d6c844a4c0e81e4d3d7e32059a..21070e9bc8d0584ec65214e2ec3b3e40396833a3 100644 (file)
@@ -665,7 +665,7 @@ static int __must_check __sta_info_destroy(struct sta_info *sta)
                BUG_ON(!sdata->bss);
 
                atomic_dec(&sdata->bss->num_sta_ps);
-               __sta_info_clear_tim_bit(sdata->bss, sta);
+               sta_info_clear_tim_bit(sta);
        }
 
        local->num_sta--;