From: Greg Kroah-Hartman Date: Tue, 6 Dec 2011 22:14:30 +0000 (-0800) Subject: 3.0 patches X-Git-Tag: v3.0.13~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5aafaac5cdc1a069b22baa1ce27ae0657a9fb44d;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0 patches added patches: rtc-disable-the-alarm-in-the-hardware.patch trace_events_filter-use-rcu_assign_pointer-when-setting-ftrace_event_call-filter.patch --- 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 index 4920cd97dd6..00000000000 --- a/queue-3.0/mac80211-fill-rate-filter-for-internal-scan-requests.patch +++ /dev/null @@ -1,36 +0,0 @@ -From c72e8d335e2c6a309b6281f2abcf491f37b8b92b Mon Sep 17 00:00:00 2001 -From: Simon Wunderlich -Date: Wed, 30 Nov 2011 16:56:30 +0100 -Subject: mac80211: fill rate filter for internal scan requests - -From: Simon Wunderlich - -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 -Signed-off-by: Mathias Kretschmer -Signed-off-by: John W. Linville -Signed-off-by: Greg Kroah-Hartman - ---- - 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 index 00000000000..3fb3a8a1266 --- /dev/null +++ b/queue-3.0/rtc-disable-the-alarm-in-the-hardware.patch @@ -0,0 +1,112 @@ +From c0afabd3d553c521e003779c127143ffde55a16f Mon Sep 17 00:00:00 2001 +From: Rabin Vincent +Date: Tue, 22 Nov 2011 11:03:14 +0100 +Subject: rtc: Disable the alarm in the hardware + +From: Rabin Vincent + +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 +Signed-off-by: Rabin Vincent +Signed-off-by: John Stultz +Signed-off-by: Greg Kroah-Hartman + +--- + 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); + } diff --git a/queue-3.0/series b/queue-3.0/series index b65d8394984..2922266b67c 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -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 index 00000000000..587ce54aed2 --- /dev/null +++ b/queue-3.0/trace_events_filter-use-rcu_assign_pointer-when-setting-ftrace_event_call-filter.patch @@ -0,0 +1,58 @@ +From d3d9acf646679c1981032b0985b386d12fccc60c Mon Sep 17 00:00:00 2001 +From: Tejun Heo +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 + +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 +Cc: Frederic Weisbecker +Cc: Jiri Olsa +Signed-off-by: Tejun Heo +Signed-off-by: Steven Rostedt +Signed-off-by: Greg Kroah-Hartman + +--- + 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();