From: Greg Kroah-Hartman Date: Fri, 26 Oct 2012 17:45:36 +0000 (-0700) Subject: 3.6-stable patches X-Git-Tag: v3.0.49~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b97c2c477b59ef93f5efa2d94fc98fda9ca461c0;p=thirdparty%2Fkernel%2Fstable-queue.git 3.6-stable patches added patches: mac80211-call-drv_get_tsf-in-sleepable-context.patch --- diff --git a/queue-3.6/mac80211-call-drv_get_tsf-in-sleepable-context.patch b/queue-3.6/mac80211-call-drv_get_tsf-in-sleepable-context.patch new file mode 100644 index 00000000000..bb34e2a434a --- /dev/null +++ b/queue-3.6/mac80211-call-drv_get_tsf-in-sleepable-context.patch @@ -0,0 +1,45 @@ +From 55fabefe3695241e6ccfa0cd4974f3fa497693dc Mon Sep 17 00:00:00 2001 +From: Thomas Pedersen +Date: Fri, 5 Oct 2012 17:57:39 -0700 +Subject: mac80211: call drv_get_tsf() in sleepable context + +From: Thomas Pedersen + +commit 55fabefe3695241e6ccfa0cd4974f3fa497693dc upstream. + +The call to drv_get/set_tsf() was put on the workqueue to perform tsf +adjustments since that function might sleep. However it ended up inside +a spinlock, whose critical section must be atomic. Do tsf adjustment +outside the spinlock instead, and get rid of a warning. + +Signed-off-by: Thomas Pedersen +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + net/mac80211/mesh_sync.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/net/mac80211/mesh_sync.c ++++ b/net/mac80211/mesh_sync.c +@@ -56,7 +56,6 @@ void mesh_sync_adjust_tbtt(struct ieee80 + u64 tsfdelta; + + spin_lock_bh(&ifmsh->sync_offset_lock); +- + if (ifmsh->sync_offset_clockdrift_max < beacon_int_fraction) { + msync_dbg(sdata, "TBTT : max clockdrift=%lld; adjusting\n", + (long long) ifmsh->sync_offset_clockdrift_max); +@@ -69,11 +68,11 @@ void mesh_sync_adjust_tbtt(struct ieee80 + tsfdelta = -beacon_int_fraction; + ifmsh->sync_offset_clockdrift_max -= beacon_int_fraction; + } ++ spin_unlock_bh(&ifmsh->sync_offset_lock); + + tsf = drv_get_tsf(local, sdata); + if (tsf != -1ULL) + drv_set_tsf(local, sdata, tsf + tsfdelta); +- spin_unlock_bh(&ifmsh->sync_offset_lock); + } + + static void mesh_sync_offset_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, diff --git a/queue-3.6/series b/queue-3.6/series index cfbec7663ce..d4c3b44fc60 100644 --- a/queue-3.6/series +++ b/queue-3.6/series @@ -82,3 +82,4 @@ ipv6-addrconf-fix-proc-net-if_inet6.patch sparc64-fix-ptrace-interaction-with-force_successful_syscall_return.patch sparc64-like-x86-we-should-check-current-mm-during-perf-backtrace-generation.patch sparc64-fix-bit-twiddling-in-sparc_pmu_enable_event.patch +mac80211-call-drv_get_tsf-in-sleepable-context.patch