<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel, branch v3.4.55</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel?h=v3.4.55</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel?h=v3.4.55'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-07-28T23:26:47Z</updated>
<entry>
<title>hrtimers: Move SMP function call to thread context</title>
<updated>2013-07-28T23:26:47Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2013-07-05T10:09:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=39367f485b87492a5e51af8496a684eafa4aec86'/>
<id>urn:sha1:39367f485b87492a5e51af8496a684eafa4aec86</id>
<content type='text'>
commit 5ec2481b7b47a4005bb446d176e5d0257400c77d upstream.

smp_call_function_* must not be called from softirq context.

But clock_was_set() which calls on_each_cpu() is called from softirq
context to implement a delayed clock_was_set() for the timer interrupt
handler. Though that almost never gets invoked. A recent change in the
resume code uses the softirq based delayed clock_was_set to support
Xens resume mechanism.

linux-next contains a new warning which warns if smp_call_function_*
is called from softirq context which gets triggered by that Xen
change.

Fix this by moving the delayed clock_was_set() call to a work context.

Reported-and-tested-by: Artem Savkov &lt;artem.savkov@gmail.com&gt;
Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Cc: David Vrabel &lt;david.vrabel@citrix.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;,
Cc: Konrad Wilk &lt;konrad.wilk@oracle.com&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
Cc: xen-devel@lists.xen.org
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tracing: Fix irqs-off tag display in syscall tracing</title>
<updated>2013-07-28T23:26:46Z</updated>
<author>
<name>zhangwei(Jovi)</name>
<email>jovi.zhangwei@huawei.com</email>
</author>
<published>2013-04-10T03:26:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f36a0d6764dcb33a280dce206f1be4bcaff5714e'/>
<id>urn:sha1:f36a0d6764dcb33a280dce206f1be4bcaff5714e</id>
<content type='text'>
commit 11034ae9c20f4057a6127fc965906417978e69b2 upstream.

All syscall tracing irqs-off tags are wrong, the syscall enter entry doesn't
disable irqs.

 [root@jovi tracing]#echo "syscalls:sys_enter_open" &gt; set_event
 [root@jovi tracing]# cat trace
 # tracer: nop
 #
 # entries-in-buffer/entries-written: 13/13   #P:2
 #
 #                              _-----=&gt; irqs-off
 #                             / _----=&gt; need-resched
 #                            | / _---=&gt; hardirq/softirq
 #                            || / _--=&gt; preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
       irqbalance-513   [000] d... 56115.496766: sys_open(filename: 804e1a6, flags: 0, mode: 1b6)
       irqbalance-513   [000] d... 56115.497008: sys_open(filename: 804e1bb, flags: 0, mode: 1b6)
         sendmail-771   [000] d... 56115.827982: sys_open(filename: b770e6d1, flags: 0, mode: 1b6)

The reason is syscall tracing doesn't record irq_flags into buffer.
The proper display is:

 [root@jovi tracing]#echo "syscalls:sys_enter_open" &gt; set_event
 [root@jovi tracing]# cat trace
 # tracer: nop
 #
 # entries-in-buffer/entries-written: 14/14   #P:2
 #
 #                              _-----=&gt; irqs-off
 #                             / _----=&gt; need-resched
 #                            | / _---=&gt; hardirq/softirq
 #                            || / _--=&gt; preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
       irqbalance-514   [001] ....    46.213921: sys_open(filename: 804e1a6, flags: 0, mode: 1b6)
       irqbalance-514   [001] ....    46.214160: sys_open(filename: 804e1bb, flags: 0, mode: 1b6)
            &lt;...&gt;-920   [001] ....    47.307260: sys_open(filename: 4e82a0c5, flags: 80000, mode: 0)

Link: http://lkml.kernel.org/r/1365564393-10972-3-git-send-email-jovi.zhangwei@huawei.com

Cc: stable@vger.kernel.org # 2.6.35
Signed-off-by: zhangwei(Jovi) &lt;jovi.zhangwei@huawei.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>perf: Fix perf_lock_task_context() vs RCU</title>
<updated>2013-07-28T23:25:48Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2013-07-12T09:08:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=41154a356f6516ffa266e50ff7d1bf706893dfe3'/>
<id>urn:sha1:41154a356f6516ffa266e50ff7d1bf706893dfe3</id>
<content type='text'>
commit 058ebd0eba3aff16b144eabf4510ed9510e1416e upstream.

Jiri managed to trigger this warning:

 [] ======================================================
 [] [ INFO: possible circular locking dependency detected ]
 [] 3.10.0+ #228 Tainted: G        W
 [] -------------------------------------------------------
 [] p/6613 is trying to acquire lock:
 []  (rcu_node_0){..-...}, at: [&lt;ffffffff810ca797&gt;] rcu_read_unlock_special+0xa7/0x250
 []
 [] but task is already holding lock:
 []  (&amp;ctx-&gt;lock){-.-...}, at: [&lt;ffffffff810f2879&gt;] perf_lock_task_context+0xd9/0x2c0
 []
 [] which lock already depends on the new lock.
 []
 [] the existing dependency chain (in reverse order) is:
 []
 [] -&gt; #4 (&amp;ctx-&gt;lock){-.-...}:
 [] -&gt; #3 (&amp;rq-&gt;lock){-.-.-.}:
 [] -&gt; #2 (&amp;p-&gt;pi_lock){-.-.-.}:
 [] -&gt; #1 (&amp;rnp-&gt;nocb_gp_wq[1]){......}:
 [] -&gt; #0 (rcu_node_0){..-...}:

Paul was quick to explain that due to preemptible RCU we cannot call
rcu_read_unlock() while holding scheduler (or nested) locks when part
of the read side critical section was preemptible.

Therefore solve it by making the entire RCU read side non-preemptible.

Also pull out the retry from under the non-preempt to play nice with RT.

Reported-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Helped-out-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>perf: Remove WARN_ON_ONCE() check in __perf_event_enable() for valid scenario</title>
<updated>2013-07-28T23:25:48Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@redhat.com</email>
</author>
<published>2013-07-09T15:44:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1f11f44083bca90ce4f534023658d481b5707d94'/>
<id>urn:sha1:1f11f44083bca90ce4f534023658d481b5707d94</id>
<content type='text'>
commit 06f417968beac6e6b614e17b37d347aa6a6b1d30 upstream.

The '!ctx-&gt;is_active' check has a valid scenario, so
there's no need for the warning.

The reason is that there's a time window between the
'ctx-&gt;is_active' check in the perf_event_enable() function
and the __perf_event_enable() function having:

  - IRQs on
  - ctx-&gt;lock unlocked

where the task could be killed and 'ctx' deactivated by
perf_event_exit_task(), ending up with the warning below.

So remove the WARN_ON_ONCE() check and add comments to
explain it all.

This addresses the following warning reported by Vince Weaver:

[  324.983534] ------------[ cut here ]------------
[  324.984420] WARNING: at kernel/events/core.c:1953 __perf_event_enable+0x187/0x190()
[  324.984420] Modules linked in:
[  324.984420] CPU: 19 PID: 2715 Comm: nmi_bug_snb Not tainted 3.10.0+ #246
[  324.984420] Hardware name: Supermicro X8DTN/X8DTN, BIOS 4.6.3 01/08/2010
[  324.984420]  0000000000000009 ffff88043fce3ec8 ffffffff8160ea0b ffff88043fce3f00
[  324.984420]  ffffffff81080ff0 ffff8802314fdc00 ffff880231a8f800 ffff88043fcf7860
[  324.984420]  0000000000000286 ffff880231a8f800 ffff88043fce3f10 ffffffff8108103a
[  324.984420] Call Trace:
[  324.984420]  &lt;IRQ&gt;  [&lt;ffffffff8160ea0b&gt;] dump_stack+0x19/0x1b
[  324.984420]  [&lt;ffffffff81080ff0&gt;] warn_slowpath_common+0x70/0xa0
[  324.984420]  [&lt;ffffffff8108103a&gt;] warn_slowpath_null+0x1a/0x20
[  324.984420]  [&lt;ffffffff81134437&gt;] __perf_event_enable+0x187/0x190
[  324.984420]  [&lt;ffffffff81130030&gt;] remote_function+0x40/0x50
[  324.984420]  [&lt;ffffffff810e51de&gt;] generic_smp_call_function_single_interrupt+0xbe/0x130
[  324.984420]  [&lt;ffffffff81066a47&gt;] smp_call_function_single_interrupt+0x27/0x40
[  324.984420]  [&lt;ffffffff8161fd2f&gt;] call_function_single_interrupt+0x6f/0x80
[  324.984420]  &lt;EOI&gt;  [&lt;ffffffff816161a1&gt;] ? _raw_spin_unlock_irqrestore+0x41/0x70
[  324.984420]  [&lt;ffffffff8113799d&gt;] perf_event_exit_task+0x14d/0x210
[  324.984420]  [&lt;ffffffff810acd04&gt;] ? switch_task_namespaces+0x24/0x60
[  324.984420]  [&lt;ffffffff81086946&gt;] do_exit+0x2b6/0xa40
[  324.984420]  [&lt;ffffffff8161615c&gt;] ? _raw_spin_unlock_irq+0x2c/0x30
[  324.984420]  [&lt;ffffffff81087279&gt;] do_group_exit+0x49/0xc0
[  324.984420]  [&lt;ffffffff81096854&gt;] get_signal_to_deliver+0x254/0x620
[  324.984420]  [&lt;ffffffff81043057&gt;] do_signal+0x57/0x5a0
[  324.984420]  [&lt;ffffffff8161a164&gt;] ? __do_page_fault+0x2a4/0x4e0
[  324.984420]  [&lt;ffffffff8161665c&gt;] ? retint_restore_args+0xe/0xe
[  324.984420]  [&lt;ffffffff816166cd&gt;] ? retint_signal+0x11/0x84
[  324.984420]  [&lt;ffffffff81043605&gt;] do_notify_resume+0x65/0x80
[  324.984420]  [&lt;ffffffff81616702&gt;] retint_signal+0x46/0x84
[  324.984420] ---[ end trace 442ec2f04db3771a ]---

Reported-by: Vince Weaver &lt;vincent.weaver@maine.edu&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Suggested-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Corey Ashford &lt;cjashfor@linux.vnet.ibm.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/1373384651-6109-2-git-send-email-jolsa@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>perf: Clone child context from parent context pmu</title>
<updated>2013-07-28T23:25:48Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@redhat.com</email>
</author>
<published>2013-07-09T15:44:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c4c6a6ea3adbe790d81ef72f623e22591704fdb9'/>
<id>urn:sha1:c4c6a6ea3adbe790d81ef72f623e22591704fdb9</id>
<content type='text'>
commit 734df5ab549ca44f40de0f07af1c8803856dfb18 upstream.

Currently when the child context for inherited events is
created, it's based on the pmu object of the first event
of the parent context.

This is wrong for the following scenario:

  - HW context having HW and SW event
  - HW event got removed (closed)
  - SW event stays in HW context as the only event
    and its pmu is used to clone the child context

The issue starts when the cpu context object is touched
based on the pmu context object (__get_cpu_context). In
this case the HW context will work with SW cpu context
ending up with following WARN below.

Fixing this by using parent context pmu object to clone
from child context.

Addresses the following warning reported by Vince Weaver:

[ 2716.472065] ------------[ cut here ]------------
[ 2716.476035] WARNING: at kernel/events/core.c:2122 task_ctx_sched_out+0x3c/0x)
[ 2716.476035] Modules linked in: nfsd auth_rpcgss oid_registry nfs_acl nfs locn
[ 2716.476035] CPU: 0 PID: 3164 Comm: perf_fuzzer Not tainted 3.10.0-rc4 #2
[ 2716.476035] Hardware name: AOpen   DE7000/nMCP7ALPx-DE R1.06 Oct.19.2012, BI2
[ 2716.476035]  0000000000000000 ffffffff8102e215 0000000000000000 ffff88011fc18
[ 2716.476035]  ffff8801175557f0 0000000000000000 ffff880119fda88c ffffffff810ad
[ 2716.476035]  ffff880119fda880 ffffffff810af02a 0000000000000009 ffff880117550
[ 2716.476035] Call Trace:
[ 2716.476035]  [&lt;ffffffff8102e215&gt;] ? warn_slowpath_common+0x5b/0x70
[ 2716.476035]  [&lt;ffffffff810ab2bd&gt;] ? task_ctx_sched_out+0x3c/0x5f
[ 2716.476035]  [&lt;ffffffff810af02a&gt;] ? perf_event_exit_task+0xbf/0x194
[ 2716.476035]  [&lt;ffffffff81032a37&gt;] ? do_exit+0x3e7/0x90c
[ 2716.476035]  [&lt;ffffffff810cd5ab&gt;] ? __do_fault+0x359/0x394
[ 2716.476035]  [&lt;ffffffff81032fe6&gt;] ? do_group_exit+0x66/0x98
[ 2716.476035]  [&lt;ffffffff8103dbcd&gt;] ? get_signal_to_deliver+0x479/0x4ad
[ 2716.476035]  [&lt;ffffffff810ac05c&gt;] ? __perf_event_task_sched_out+0x230/0x2d1
[ 2716.476035]  [&lt;ffffffff8100205d&gt;] ? do_signal+0x3c/0x432
[ 2716.476035]  [&lt;ffffffff810abbf9&gt;] ? ctx_sched_in+0x43/0x141
[ 2716.476035]  [&lt;ffffffff810ac2ca&gt;] ? perf_event_context_sched_in+0x7a/0x90
[ 2716.476035]  [&lt;ffffffff810ac311&gt;] ? __perf_event_task_sched_in+0x31/0x118
[ 2716.476035]  [&lt;ffffffff81050dd9&gt;] ? mmdrop+0xd/0x1c
[ 2716.476035]  [&lt;ffffffff81051a39&gt;] ? finish_task_switch+0x7d/0xa6
[ 2716.476035]  [&lt;ffffffff81002473&gt;] ? do_notify_resume+0x20/0x5d
[ 2716.476035]  [&lt;ffffffff813654f5&gt;] ? retint_signal+0x3d/0x78
[ 2716.476035] ---[ end trace 827178d8a5966c3d ]---

Reported-by: Vince Weaver &lt;vincent.weaver@maine.edu&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Corey Ashford &lt;cjashfor@linux.vnet.ibm.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/1373384651-6109-1-git-send-email-jolsa@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tracing: Use current_uid() for critical time tracing</title>
<updated>2013-07-28T23:25:47Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-05-31T01:10:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d018274f859ae2cfbe86646948b65a4edd0d335f'/>
<id>urn:sha1:d018274f859ae2cfbe86646948b65a4edd0d335f</id>
<content type='text'>
commit f17a5194859a82afe4164e938b92035b86c55794 upstream.

The irqsoff tracer records the max time that interrupts are disabled.
There are hooks in the assembly code that calls back into the tracer when
interrupts are disabled or enabled.

When they are enabled, the tracer checks if the amount of time they
were disabled is larger than the previous recorded max interrupts off
time. If it is, it creates a snapshot of the currently running trace
to store where the last largest interrupts off time was held and how
it happened.

During testing, this RCU lockdep dump appeared:

[ 1257.829021] ===============================
[ 1257.829021] [ INFO: suspicious RCU usage. ]
[ 1257.829021] 3.10.0-rc1-test+ #171 Tainted: G        W
[ 1257.829021] -------------------------------
[ 1257.829021] /home/rostedt/work/git/linux-trace.git/include/linux/rcupdate.h:780 rcu_read_lock() used illegally while idle!
[ 1257.829021]
[ 1257.829021] other info that might help us debug this:
[ 1257.829021]
[ 1257.829021]
[ 1257.829021] RCU used illegally from idle CPU!
[ 1257.829021] rcu_scheduler_active = 1, debug_locks = 0
[ 1257.829021] RCU used illegally from extended quiescent state!
[ 1257.829021] 2 locks held by trace-cmd/4831:
[ 1257.829021]  #0:  (max_trace_lock){......}, at: [&lt;ffffffff810e2b77&gt;] stop_critical_timing+0x1a3/0x209
[ 1257.829021]  #1:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff810dae5a&gt;] __update_max_tr+0x88/0x1ee
[ 1257.829021]
[ 1257.829021] stack backtrace:
[ 1257.829021] CPU: 3 PID: 4831 Comm: trace-cmd Tainted: G        W    3.10.0-rc1-test+ #171
[ 1257.829021] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./To be filled by O.E.M., BIOS SDBLI944.86P 05/08/2007
[ 1257.829021]  0000000000000001 ffff880065f49da8 ffffffff8153dd2b ffff880065f49dd8
[ 1257.829021]  ffffffff81092a00 ffff88006bd78680 ffff88007add7500 0000000000000003
[ 1257.829021]  ffff88006bd78680 ffff880065f49e18 ffffffff810daebf ffffffff810dae5a
[ 1257.829021] Call Trace:
[ 1257.829021]  [&lt;ffffffff8153dd2b&gt;] dump_stack+0x19/0x1b
[ 1257.829021]  [&lt;ffffffff81092a00&gt;] lockdep_rcu_suspicious+0x109/0x112
[ 1257.829021]  [&lt;ffffffff810daebf&gt;] __update_max_tr+0xed/0x1ee
[ 1257.829021]  [&lt;ffffffff810dae5a&gt;] ? __update_max_tr+0x88/0x1ee
[ 1257.829021]  [&lt;ffffffff811002b9&gt;] ? user_enter+0xfd/0x107
[ 1257.829021]  [&lt;ffffffff810dbf85&gt;] update_max_tr_single+0x11d/0x12d
[ 1257.829021]  [&lt;ffffffff811002b9&gt;] ? user_enter+0xfd/0x107
[ 1257.829021]  [&lt;ffffffff810e2b15&gt;] stop_critical_timing+0x141/0x209
[ 1257.829021]  [&lt;ffffffff8109569a&gt;] ? trace_hardirqs_on+0xd/0xf
[ 1257.829021]  [&lt;ffffffff811002b9&gt;] ? user_enter+0xfd/0x107
[ 1257.829021]  [&lt;ffffffff810e3057&gt;] time_hardirqs_on+0x2a/0x2f
[ 1257.829021]  [&lt;ffffffff811002b9&gt;] ? user_enter+0xfd/0x107
[ 1257.829021]  [&lt;ffffffff8109550c&gt;] trace_hardirqs_on_caller+0x16/0x197
[ 1257.829021]  [&lt;ffffffff8109569a&gt;] trace_hardirqs_on+0xd/0xf
[ 1257.829021]  [&lt;ffffffff811002b9&gt;] user_enter+0xfd/0x107
[ 1257.829021]  [&lt;ffffffff810029b4&gt;] do_notify_resume+0x92/0x97
[ 1257.829021]  [&lt;ffffffff8154bdca&gt;] int_signal+0x12/0x17

What happened was entering into the user code, the interrupts were enabled
and a max interrupts off was recorded. The trace buffer was saved along with
various information about the task: comm, pid, uid, priority, etc.

The uid is recorded with task_uid(tsk). But this is a macro that uses rcu_read_lock()
to retrieve the data, and this happened to happen where RCU is blind (user_enter).

As only the preempt and irqs off tracers can have this happen, and they both
only have the tsk == current, if tsk == current, use current_uid() instead of
task_uid(), as current_uid() does not use RCU as only current can change its uid.

This fixes the RCU suspicious splat.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tick: Prevent uncontrolled switch to oneshot mode</title>
<updated>2013-07-28T23:25:44Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2013-07-01T20:14:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=60a0c1a6129d06f1f6bc71acd50c8d289484c7ea'/>
<id>urn:sha1:60a0c1a6129d06f1f6bc71acd50c8d289484c7ea</id>
<content type='text'>
commit 1f73a9806bdd07a5106409bbcab3884078bd34fe upstream.

When the system switches from periodic to oneshot mode, the broadcast
logic causes a possibility that a CPU which has not yet switched to
oneshot mode puts its own clock event device into oneshot mode without
updating the state and the timer handler.

CPU0				CPU1
				per cpu tickdev is in periodic mode
				and switched to broadcast

Switch to oneshot mode
 tick_broadcast_switch_to_oneshot()
  cpumask_copy(tick_oneshot_broacast_mask,
	       tick_broadcast_mask);

  broadcast device mode = oneshot

				Timer interrupt

				irq_enter()
				 tick_check_oneshot_broadcast()
				  dev-&gt;set_mode(ONESHOT);

				tick_handle_periodic()
				 if (dev-&gt;mode == ONESHOT)
				   dev-&gt;next_event += period;
				   FAIL.

We fail, because dev-&gt;next_event contains KTIME_MAX, if the device was
in periodic mode before the uncontrolled switch to oneshot happened.

We must copy the broadcast bits over to the oneshot mask, because
otherwise a CPU which relies on the broadcast would not been woken up
anymore after the broadcast device switched to oneshot mode.

So we need to verify in tick_check_oneshot_broadcast() whether the CPU
has already switched to oneshot mode. If not, leave the device
untouched and let the CPU switch controlled into oneshot mode.

This is a long standing bug, which was never noticed, because the main
user of the broadcast x86 cannot run into that scenario, AFAICT. The
nonarchitected timer mess of ARM creates a gazillion of differently
broken abominations which trigger the shortcomings of that broadcast
code, which better had never been necessary in the first place.

Reported-and-tested-by: Stehle Vincent-B46079 &lt;B46079@freescale.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;,
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1307012153060.4013@ionos.tec.linutronix.de
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>timer: Fix jiffies wrap behavior of round_jiffies_common()</title>
<updated>2013-07-22T01:19:01Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@gmail.com</email>
</author>
<published>2013-05-21T18:43:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7b1648b7dc2f1954a3492e5127a4b6a408814964'/>
<id>urn:sha1:7b1648b7dc2f1954a3492e5127a4b6a408814964</id>
<content type='text'>
commit 9e04d3804d3ac97d8c03a41d78d0f0674b5d01e1 upstream.

Direct compare of jiffies related values does not work in the wrap
around case. Replace it with time_is_after_jiffies().

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Cc: Arjan van de Ven &lt;arjan@infradead.org&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Link: http://lkml.kernel.org/r/519BC066.5080600@acm.org
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>genirq: Fix can_request_irq() for IRQs without an action</title>
<updated>2013-07-22T01:19:01Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2013-06-28T01:40:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f95bc0f79df33f63a1615d18c92abf829208e2a2'/>
<id>urn:sha1:f95bc0f79df33f63a1615d18c92abf829208e2a2</id>
<content type='text'>
commit 2779db8d37d4b542d9ca2575f5f178dbeaca6c86 upstream.

Commit 02725e7471b8 ('genirq: Use irq_get/put functions'),
inadvertently changed can_request_irq() to return 0 for IRQs that have
no action.  This causes pcibios_lookup_irq() to select only IRQs that
already have an action with IRQF_SHARED set, or to fail if there are
none.  Change can_request_irq() to return 1 for IRQs that have no
action (if the first two conditions are met).

Reported-by: Bjarni Ingi Gislason &lt;bjarniig@rhi.hi.is&gt;
Tested-by: Bjarni Ingi Gislason &lt;bjarniig@rhi.hi.is&gt; (against 3.2)
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: 709647@bugs.debian.org
Link: http://bugs.debian.org/709647
Link: http://lkml.kernel.org/r/1372383630.23847.40.camel@deadeye.wl.decadent.org.uk
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Revert "sched: Add missing call to calc_load_exit_idle()"</title>
<updated>2013-07-13T18:03:41Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-07-11T21:04:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6d96e9394365dfddf5d418d8178ce2a503448c29'/>
<id>urn:sha1:6d96e9394365dfddf5d418d8178ce2a503448c29</id>
<content type='text'>
This reverts commit 48f0f14ffb6ff4852922994d11fbda418d40100e which was
commit 749c8814f08f12baa4a9c2812a7c6ede7d69507d upstream.

It seems to be misapplied, and not needed for 3.4-stable

Reported-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Cc: Charles Wang &lt;muming.wq@taobao.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
