]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Oct 2012 17:45:36 +0000 (10:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Oct 2012 17:45:36 +0000 (10:45 -0700)
added patches:
mac80211-call-drv_get_tsf-in-sleepable-context.patch

queue-3.6/mac80211-call-drv_get_tsf-in-sleepable-context.patch [new file with mode: 0644]
queue-3.6/series

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 (file)
index 0000000..bb34e2a
--- /dev/null
@@ -0,0 +1,45 @@
+From 55fabefe3695241e6ccfa0cd4974f3fa497693dc Mon Sep 17 00:00:00 2001
+From: Thomas Pedersen <thomas@cozybit.com>
+Date: Fri, 5 Oct 2012 17:57:39 -0700
+Subject: mac80211: call drv_get_tsf() in sleepable context
+
+From: Thomas Pedersen <thomas@cozybit.com>
+
+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 <thomas@cozybit.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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,
index cfbec7663cef1dafe2aa48f0793bc02b1b2ef09c..d4c3b44fc60bd38a5d76246cf134963fdc347228 100644 (file)
@@ -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