]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Dec 2011 22:14:30 +0000 (14:14 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Dec 2011 22:14:30 +0000 (14:14 -0800)
added patches:
rtc-disable-the-alarm-in-the-hardware.patch
trace_events_filter-use-rcu_assign_pointer-when-setting-ftrace_event_call-filter.patch

queue-3.0/mac80211-fill-rate-filter-for-internal-scan-requests.patch [deleted file]
queue-3.0/rtc-disable-the-alarm-in-the-hardware.patch [new file with mode: 0644]
queue-3.0/series
queue-3.0/trace_events_filter-use-rcu_assign_pointer-when-setting-ftrace_event_call-filter.patch [new file with mode: 0644]

diff --git a/queue-3.0/mac80211-fill-rate-filter-for-internal-scan-requests.patch b/queue-3.0/mac80211-fill-rate-filter-for-internal-scan-requests.patch
deleted file mode 100644 (file)
index 4920cd9..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-From c72e8d335e2c6a309b6281f2abcf491f37b8b92b Mon Sep 17 00:00:00 2001
-From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
-Date: Wed, 30 Nov 2011 16:56:30 +0100
-Subject: mac80211: fill rate filter for internal scan requests
-
-From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
-
-commit c72e8d335e2c6a309b6281f2abcf491f37b8b92b upstream.
-
-The rates bitmap for internal scan requests shoud be filled,
-otherwise there will be probe requests with zero rates supported.
-
-Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
-Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
-Signed-off-by: John W. Linville <linville@tuxdriver.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- net/mac80211/main.c |    6 ++++++
- 1 file changed, 6 insertions(+)
-
---- a/net/mac80211/main.c
-+++ b/net/mac80211/main.c
-@@ -742,6 +742,12 @@ int ieee80211_register_hw(struct ieee802
-       if (!local->int_scan_req)
-               return -ENOMEM;
-+      for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
-+              if (!local->hw.wiphy->bands[band])
-+                      continue;
-+              local->int_scan_req->rates[band] = (u32) -1;
-+      }
-+
-       /* if low-level driver supports AP, we also support VLAN */
-       if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_AP)) {
-               hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP_VLAN);
diff --git a/queue-3.0/rtc-disable-the-alarm-in-the-hardware.patch b/queue-3.0/rtc-disable-the-alarm-in-the-hardware.patch
new file mode 100644 (file)
index 0000000..3fb3a8a
--- /dev/null
@@ -0,0 +1,112 @@
+From c0afabd3d553c521e003779c127143ffde55a16f Mon Sep 17 00:00:00 2001
+From: Rabin Vincent <rabin.vincent@stericsson.com>
+Date: Tue, 22 Nov 2011 11:03:14 +0100
+Subject: rtc: Disable the alarm in the hardware
+
+From: Rabin Vincent <rabin.vincent@stericsson.com>
+
+commit c0afabd3d553c521e003779c127143ffde55a16f upstream.
+
+Currently, the RTC code does not disable the alarm in the hardware.
+
+This means that after a sequence such as the one below (the files are in the
+RTC sysfs), the box will boot up after 2 minutes even though we've
+asked for the alarm to be turned off.
+
+       # echo $((`cat since_epoch`)+120) > wakealarm
+       # echo 0 > wakealarm
+       # poweroff
+
+Fix this by disabling the alarm when there are no timers to run.
+
+Cc: John Stultz <john.stultz@linaro.org>
+Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
+Signed-off-by: John Stultz <john.stultz@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/rtc/interface.c |   44 ++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 34 insertions(+), 10 deletions(-)
+
+--- a/drivers/rtc/interface.c
++++ b/drivers/rtc/interface.c
+@@ -318,6 +318,20 @@ int rtc_read_alarm(struct rtc_device *rt
+ }
+ EXPORT_SYMBOL_GPL(rtc_read_alarm);
++static int ___rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
++{
++      int err;
++
++      if (!rtc->ops)
++              err = -ENODEV;
++      else if (!rtc->ops->set_alarm)
++              err = -EINVAL;
++      else
++              err = rtc->ops->set_alarm(rtc->dev.parent, alarm);
++
++      return err;
++}
++
+ static int __rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
+ {
+       struct rtc_time tm;
+@@ -341,14 +355,7 @@ static int __rtc_set_alarm(struct rtc_de
+        * over right here, before we set the alarm.
+        */
+-      if (!rtc->ops)
+-              err = -ENODEV;
+-      else if (!rtc->ops->set_alarm)
+-              err = -EINVAL;
+-      else
+-              err = rtc->ops->set_alarm(rtc->dev.parent, alarm);
+-
+-      return err;
++      return ___rtc_set_alarm(rtc, alarm);
+ }
+ int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
+@@ -762,6 +769,20 @@ static int rtc_timer_enqueue(struct rtc_
+       return 0;
+ }
++static void rtc_alarm_disable(struct rtc_device *rtc)
++{
++      struct rtc_wkalrm alarm;
++      struct rtc_time tm;
++
++      __rtc_read_time(rtc, &tm);
++
++      alarm.time = rtc_ktime_to_tm(ktime_add(rtc_tm_to_ktime(tm),
++                                   ktime_set(300, 0)));
++      alarm.enabled = 0;
++
++      ___rtc_set_alarm(rtc, &alarm);
++}
++
+ /**
+  * rtc_timer_remove - Removes a rtc_timer from the rtc_device timerqueue
+  * @rtc rtc device
+@@ -783,8 +804,10 @@ static void rtc_timer_remove(struct rtc_
+               struct rtc_wkalrm alarm;
+               int err;
+               next = timerqueue_getnext(&rtc->timerqueue);
+-              if (!next)
++              if (!next) {
++                      rtc_alarm_disable(rtc);
+                       return;
++              }
+               alarm.time = rtc_ktime_to_tm(next->expires);
+               alarm.enabled = 1;
+               err = __rtc_set_alarm(rtc, &alarm);
+@@ -846,7 +869,8 @@ again:
+               err = __rtc_set_alarm(rtc, &alarm);
+               if (err == -ETIME)
+                       goto again;
+-      }
++      } else
++              rtc_alarm_disable(rtc);
+       mutex_unlock(&rtc->ops_lock);
+ }
index b65d8394984b794b5f45f9966de296773076d5cd..2922266b67ca6f3515e5828e505f69fba7a274b3 100644 (file)
@@ -62,7 +62,6 @@ x86-paravirt-pte-updates-in-k-un-map_atomic-need-to-be-synchronous-regardless-of
 perf-x86-fix-pebs-instruction-unwind.patch
 oprofile-x86-fix-crash-when-unloading-module-nmi-timer-mode.patch
 add-missing-.set-function-for-nt_s390_last_break-regset.patch
-mac80211-fill-rate-filter-for-internal-scan-requests.patch
 cfg80211-fix-race-on-init-and-driver-registration.patch
 cfg80211-amend-regulatory-null-dereference-fix.patch
 genirq-fix-race-condition-when-stopping-the-irq-thread.patch
@@ -70,3 +69,5 @@ nfs-prevent-3.0-from-crashing-if-it-receives-a-partial-layout.patch
 xfs-validate-acl-count.patch
 xfs-force-buffer-writeback-before-blocking-on-the-ilock-in-inode-reclaim.patch
 xfs-fix-attr2-vs-large-data-fork-assert.patch
+trace_events_filter-use-rcu_assign_pointer-when-setting-ftrace_event_call-filter.patch
+rtc-disable-the-alarm-in-the-hardware.patch
diff --git a/queue-3.0/trace_events_filter-use-rcu_assign_pointer-when-setting-ftrace_event_call-filter.patch b/queue-3.0/trace_events_filter-use-rcu_assign_pointer-when-setting-ftrace_event_call-filter.patch
new file mode 100644 (file)
index 0000000..587ce54
--- /dev/null
@@ -0,0 +1,58 @@
+From d3d9acf646679c1981032b0985b386d12fccc60c Mon Sep 17 00:00:00 2001
+From: Tejun Heo <tj@kernel.org>
+Date: Wed, 23 Nov 2011 08:49:49 -0800
+Subject: trace_events_filter: Use rcu_assign_pointer() when setting ftrace_event_call->filter
+
+From: Tejun Heo <tj@kernel.org>
+
+commit d3d9acf646679c1981032b0985b386d12fccc60c upstream.
+
+ftrace_event_call->filter is sched RCU protected but didn't use
+rcu_assign_pointer().  Use it.
+
+TODO: Add proper __rcu annotation to call->filter and all its users.
+
+-v2: Use RCU_INIT_POINTER() for %NULL clearing as suggested by Eric.
+
+Link: http://lkml.kernel.org/r/20111123164949.GA29639@google.com
+
+Cc: Eric Dumazet <eric.dumazet@gmail.com>
+Cc: Frederic Weisbecker <fweisbec@gmail.com>
+Cc: Jiri Olsa <jolsa@redhat.com>
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/trace/trace_events_filter.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/kernel/trace/trace_events_filter.c
++++ b/kernel/trace/trace_events_filter.c
+@@ -1766,7 +1766,7 @@ static int replace_system_preds(struct e
+                * replace the filter for the call.
+                */
+               filter = call->filter;
+-              call->filter = filter_item->filter;
++              rcu_assign_pointer(call->filter, filter_item->filter);
+               filter_item->filter = filter;
+               fail = false;
+@@ -1821,7 +1821,7 @@ int apply_event_filter(struct ftrace_eve
+               filter = call->filter;
+               if (!filter)
+                       goto out_unlock;
+-              call->filter = NULL;
++              RCU_INIT_POINTER(call->filter, NULL);
+               /* Make sure the filter is not being used */
+               synchronize_sched();
+               __free_filter(filter);
+@@ -1862,7 +1862,7 @@ out:
+        * string
+        */
+       tmp = call->filter;
+-      call->filter = filter;
++      rcu_assign_pointer(call->filter, filter);
+       if (tmp) {
+               /* Make sure the call is done with the filter */
+               synchronize_sched();