<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel, branch v3.4.44</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel?h=v3.4.44</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel?h=v3.4.44'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-05-08T02:51:56Z</updated>
<entry>
<title>clockevents: Set dummy handler on CPU_DEAD shutdown</title>
<updated>2013-05-08T02:51:56Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2013-04-25T09:45:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=357093a8b82c10e6fff37d3c772ccc0e3b0549c4'/>
<id>urn:sha1:357093a8b82c10e6fff37d3c772ccc0e3b0549c4</id>
<content type='text'>
commit 6f7a05d7018de222e40ca003721037a530979974 upstream.

Vitaliy reported that a per cpu HPET timer interrupt crashes the
system during hibernation. What happens is that the per cpu HPET timer
gets shut down when the nonboot cpus are stopped. When the nonboot
cpus are onlined again the HPET code sets up the MSI interrupt which
fires before the clock event device is registered. The event handler
is still set to hrtimer_interrupt, which then crashes the machine due
to highres mode not being active.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=700333

There is no real good way to avoid that in the HPET code. The HPET
code alrady has a mechanism to detect spurious interrupts when event
handler == NULL for a similar reason.

We can handle that in the clockevent/tick layer and replace the
previous functional handler with a dummy handler like we do in
tick_setup_new_device().

The original clockevents code did this in clockevents_exchange_device(),
but that got removed by commit 7c1e76897 (clockevents: prevent
clockevent event_handler ending up handler_noop) which forgot to fix
it up in tick_shutdown(). Same issue with the broadcast device.

Reported-by: Vitaliy Fillipov &lt;vitalif@yourcmc.ru&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: 700333@bugs.debian.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>cgroup: fix an off-by-one bug which may trigger BUG_ON()</title>
<updated>2013-05-08T02:51:56Z</updated>
<author>
<name>Li Zefan</name>
<email>lizefan@huawei.com</email>
</author>
<published>2013-03-12T22:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=97630ecdbda8138baf35a66b6e59dee940da05e1'/>
<id>urn:sha1:97630ecdbda8138baf35a66b6e59dee940da05e1</id>
<content type='text'>
commit 3ac1707a13a3da9cfc8f242a15b2fae6df2c5f88 upstream.

The 3rd parameter of flex_array_prealloc() is the number of elements,
not the index of the last element.

The effect of the bug is, when opening cgroup.procs, a flex array will
be allocated and all elements of the array is allocated with
GFP_KERNEL flag, but the last one is GFP_ATOMIC, and if we fail to
allocate memory for it, it'll trigger a BUG_ON().

Signed-off-by: Li Zefan &lt;lizefan@huawei.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>hrtimer: Add expiry time overflow check in hrtimer_interrupt</title>
<updated>2013-05-08T02:51:55Z</updated>
<author>
<name>Prarit Bhargava</name>
<email>prarit@redhat.com</email>
</author>
<published>2013-04-08T12:47:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=194d30b3996940a012ed8265f3969f1f75ff7ec5'/>
<id>urn:sha1:194d30b3996940a012ed8265f3969f1f75ff7ec5</id>
<content type='text'>
commit 8f294b5a139ee4b75e890ad5b443c93d1e558a8b upstream.

The settimeofday01 test in the LTP testsuite effectively does

        gettimeofday(current time);
        settimeofday(Jan 1, 1970 + 100 seconds);
        settimeofday(current time);

This test causes a stack trace to be displayed on the console during the
setting of timeofday to Jan 1, 1970 + 100 seconds:

[  131.066751] ------------[ cut here ]------------
[  131.096448] WARNING: at kernel/time/clockevents.c:209 clockevents_program_event+0x135/0x140()
[  131.104935] Hardware name: Dinar
[  131.108150] Modules linked in: sg nfsv3 nfs_acl nfsv4 auth_rpcgss nfs dns_resolver fscache lockd sunrpc nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE ip6table_mangle ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 iptable_nat nf_nat_ipv4 nf_nat iptable_mangle ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables kvm_amd kvm sp5100_tco bnx2 i2c_piix4 crc32c_intel k10temp fam15h_power ghash_clmulni_intel amd64_edac_mod pcspkr serio_raw edac_mce_amd edac_core microcode xfs libcrc32c sr_mod sd_mod cdrom ata_generic crc_t10dif pata_acpi radeon i2c_algo_bit drm_kms_helper ttm drm ahci pata_atiixp libahci libata usb_storage i2c_core dm_mirror dm_region_hash dm_log dm_mod
[  131.176784] Pid: 0, comm: swapper/28 Not tainted 3.8.0+ #6
[  131.182248] Call Trace:
[  131.184684]  &lt;IRQ&gt;  [&lt;ffffffff810612af&gt;] warn_slowpath_common+0x7f/0xc0
[  131.191312]  [&lt;ffffffff8106130a&gt;] warn_slowpath_null+0x1a/0x20
[  131.197131]  [&lt;ffffffff810b9fd5&gt;] clockevents_program_event+0x135/0x140
[  131.203721]  [&lt;ffffffff810bb584&gt;] tick_program_event+0x24/0x30
[  131.209534]  [&lt;ffffffff81089ab1&gt;] hrtimer_interrupt+0x131/0x230
[  131.215437]  [&lt;ffffffff814b9600&gt;] ? cpufreq_p4_target+0x130/0x130
[  131.221509]  [&lt;ffffffff81619119&gt;] smp_apic_timer_interrupt+0x69/0x99
[  131.227839]  [&lt;ffffffff8161805d&gt;] apic_timer_interrupt+0x6d/0x80
[  131.233816]  &lt;EOI&gt;  [&lt;ffffffff81099745&gt;] ? sched_clock_cpu+0xc5/0x120
[  131.240267]  [&lt;ffffffff814b9ff0&gt;] ? cpuidle_wrap_enter+0x50/0xa0
[  131.246252]  [&lt;ffffffff814b9fe9&gt;] ? cpuidle_wrap_enter+0x49/0xa0
[  131.252238]  [&lt;ffffffff814ba050&gt;] cpuidle_enter_tk+0x10/0x20
[  131.257877]  [&lt;ffffffff814b9c89&gt;] cpuidle_idle_call+0xa9/0x260
[  131.263692]  [&lt;ffffffff8101c42f&gt;] cpu_idle+0xaf/0x120
[  131.268727]  [&lt;ffffffff815f8971&gt;] start_secondary+0x255/0x257
[  131.274449] ---[ end trace 1151a50552231615 ]---

When we change the system time to a low value like this, the value of
timekeeper-&gt;offs_real will be a negative value.

It seems that the WARN occurs because an hrtimer has been started in the time
between the releasing of the timekeeper lock and the IPI call (via a call to
on_each_cpu) in clock_was_set() in the do_settimeofday() code.  The end result
is that a REALTIME_CLOCK timer has been added with softexpires = expires =
KTIME_MAX.  The hrtimer_interrupt() fires/is called and the loop at
kernel/hrtimer.c:1289 is executed.  In this loop the code subtracts the
clock base's offset (which was set to timekeeper-&gt;offs_real in
do_settimeofday()) from the current hrtimer_cpu_base-&gt;expiry value (which
was KTIME_MAX):

	KTIME_MAX - (a negative value) = overflow

A simple check for an overflow can resolve this problem.  Using KTIME_MAX
instead of the overflow value will result in the hrtimer function being run,
and the reprogramming of the timer after that.

Reviewed-by: Rik van Riel &lt;riel@redhat.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
[jstultz: Tweaked commit subject]
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>hrtimer: Fix ktime_add_ns() overflow on 32bit architectures</title>
<updated>2013-05-08T02:51:55Z</updated>
<author>
<name>David Engraf</name>
<email>david.engraf@sysgo.com</email>
</author>
<published>2013-03-19T12:29:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=86a640faa8585b60b2f2f78dd9769e2cc939208f'/>
<id>urn:sha1:86a640faa8585b60b2f2f78dd9769e2cc939208f</id>
<content type='text'>
commit 51fd36f3fad8447c487137ae26b9d0b3ce77bb25 upstream.

One can trigger an overflow when using ktime_add_ns() on a 32bit
architecture not supporting CONFIG_KTIME_SCALAR.

When passing a very high value for u64 nsec, e.g. 7881299347898368000
the do_div() function converts this value to seconds (7881299347) which
is still to high to pass to the ktime_set() function as long. The result
in is a negative value.

The problem on my system occurs in the tick-sched.c,
tick_nohz_stop_sched_tick() when time_delta is set to
timekeeping_max_deferment(). The check for time_delta &lt; KTIME_MAX is
valid, thus ktime_add_ns() is called with a too large value resulting in
a negative expire value. This leads to an endless loop in the ticker code:

time_delta: 7881299347898368000
expires = ktime_add_ns(last_update, time_delta)
expires: negative value

This fix caps the value to KTIME_MAX.

This error doesn't occurs on 64bit or architectures supporting
CONFIG_KTIME_SCALAR (e.g. ARM, x86-32).

Signed-off-by: David Engraf &lt;david.engraf@sysgo.com&gt;
[jstultz: Minor tweaks to commit message &amp; header]
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tracing: Reset ftrace_graph_filter_enabled if count is zero</title>
<updated>2013-05-08T02:51:54Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-04-11T07:01:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=761694a0bdc01817d1212b1127234dcaf828fde7'/>
<id>urn:sha1:761694a0bdc01817d1212b1127234dcaf828fde7</id>
<content type='text'>
commit 9f50afccfdc15d95d7331acddcb0f7703df089ae upstream.

The ftrace_graph_count can be decreased with a "!" pattern, so that
the enabled flag should be updated too.

Link: http://lkml.kernel.org/r/1365663698-2413-1-git-send-email-namhyung@kernel.org

Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung.kim@lge.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>tracing: Check return value of tracing_init_dentry()</title>
<updated>2013-05-08T02:51:54Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-04-10T00:18:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e1672f4e2c9fb1231a6242ca1596806f123da3c5'/>
<id>urn:sha1:e1672f4e2c9fb1231a6242ca1596806f123da3c5</id>
<content type='text'>
commit ed6f1c996bfe4b6e520cf7a74b51cd6988d84420 upstream.

Check return value and bail out if it's NULL.

Link: http://lkml.kernel.org/r/1365553093-10180-2-git-send-email-namhyung@kernel.org

Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung.kim@lge.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>tracing: Fix off-by-one on allocating stat-&gt;pages</title>
<updated>2013-05-08T02:51:54Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-04-01T12:46:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=226c8ea60cfc71732ff2212fae71077789718e51'/>
<id>urn:sha1:226c8ea60cfc71732ff2212fae71077789718e51</id>
<content type='text'>
commit 39e30cd1537937d3c00ef87e865324e981434e5b upstream.

The first page was allocated separately, so no need to start from 0.

Link: http://lkml.kernel.org/r/1364820385-32027-2-git-send-email-namhyung@kernel.org

Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung.kim@lge.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>tracing: Remove most or all of stack tracer stack size from stack_max_size</title>
<updated>2013-05-08T02:51:54Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-03-14T03:34:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d4ca6ccafc266cefbd004e515695cbeb1e8b8411'/>
<id>urn:sha1:d4ca6ccafc266cefbd004e515695cbeb1e8b8411</id>
<content type='text'>
commit 4df297129f622bdc18935c856f42b9ddd18f9f28 upstream.

Currently, the depth reported in the stack tracer stack_trace file
does not match the stack_max_size file. This is because the stack_max_size
includes the overhead of stack tracer itself while the depth does not.

The first time a max is triggered, a calculation is not performed that
figures out the overhead of the stack tracer and subtracts it from
the stack_max_size variable. The overhead is stored and is subtracted
from the reported stack size for comparing for a new max.

Now the stack_max_size corresponds to the reported depth:

 # cat stack_max_size
4640

 # cat stack_trace
        Depth    Size   Location    (48 entries)
        -----    ----   --------
  0)     4640      32   _raw_spin_lock+0x18/0x24
  1)     4608     112   ____cache_alloc+0xb7/0x22d
  2)     4496      80   kmem_cache_alloc+0x63/0x12f
  3)     4416      16   mempool_alloc_slab+0x15/0x17
[...]

While testing against and older gcc on x86 that uses mcount instead
of fentry, I found that pasing in ip + MCOUNT_INSN_SIZE let the
stack trace show one more function deep which was missing before.

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>tracing: Fix stack tracer with fentry use</title>
<updated>2013-05-08T02:51:54Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-03-14T01:25:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=af1860122000cf090868fb7f7fbba7417e4575bd'/>
<id>urn:sha1:af1860122000cf090868fb7f7fbba7417e4575bd</id>
<content type='text'>
commit d4ecbfc49b4b1d4b597fb5ba9e4fa25d62f105c5 upstream.

When gcc 4.6 on x86 is used, the function tracer will use the new
option -mfentry which does a call to "fentry" at every function
instead of "mcount". The significance of this is that fentry is
called as the first operation of the function instead of the mcount
usage of being called after the stack.

This causes the stack tracer to show some bogus results for the size
of the last function traced, as well as showing "ftrace_call" instead
of the function. This is due to the stack frame not being set up
by the function that is about to be traced.

 # cat stack_trace
        Depth    Size   Location    (48 entries)
        -----    ----   --------
  0)     4824     216   ftrace_call+0x5/0x2f
  1)     4608     112   ____cache_alloc+0xb7/0x22d
  2)     4496      80   kmem_cache_alloc+0x63/0x12f

The 216 size for ftrace_call includes both the ftrace_call stack
(which includes the saving of registers it does), as well as the
stack size of the parent.

To fix this, if CC_USING_FENTRY is defined, then the stack_tracer
will reserve the first item in stack_dump_trace[] array when
calling save_stack_trace(), and it will fill it in with the parent ip.
Then the code will look for the parent pointer on the stack and
give the real size of the parent's stack pointer:

 # cat stack_trace
        Depth    Size   Location    (14 entries)
        -----    ----   --------
  0)     2640      48   update_group_power+0x26/0x187
  1)     2592     224   update_sd_lb_stats+0x2a5/0x4ac
  2)     2368     160   find_busiest_group+0x31/0x1f1
  3)     2208     256   load_balance+0xd9/0x662

I'm Cc'ing stable, although it's not urgent, as it only shows bogus
size for item #0, the rest of the trace is legit. It should still be
corrected in previous stable releases.

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>tracing: Use stack of calling function for stack tracer</title>
<updated>2013-05-08T02:51:54Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-03-14T00:43:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=893238186e35bdd59efde4572bcb6d0653c0ec65'/>
<id>urn:sha1:893238186e35bdd59efde4572bcb6d0653c0ec65</id>
<content type='text'>
commit 87889501d0adfae10e3b0f0e6f2d7536eed9ae84 upstream.

Use the stack of stack_trace_call() instead of check_stack() as
the test pointer for max stack size. It makes it a bit cleaner
and a little more accurate.

Adding stable, as a later fix depends on this patch.

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

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