<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel, branch v3.4.52</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel?h=v3.4.52</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel?h=v3.4.52'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-07-03T17:59:06Z</updated>
<entry>
<title>perf: Fix mmap() accounting hole</title>
<updated>2013-07-03T17:59:06Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2013-06-04T08:44:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=703197b61d05f5edae54bad3256901c5a5c8794c'/>
<id>urn:sha1:703197b61d05f5edae54bad3256901c5a5c8794c</id>
<content type='text'>
commit 9bb5d40cd93c9dd4be74834b1dcb1ba03629716b upstream.

Vince's fuzzer once again found holes. This time it spotted a leak in
the locked page accounting.

When an event had redirected output and its close() was the last
reference to the buffer we didn't have a vm context to undo accounting.

Change the code to destroy the buffer on the last munmap() and detach
all redirected events at that time. This provides us the right context
to undo the vm accounting.

[Backporting for 3.4-stable.
VM_RESERVED flag was replaced with pair 'VM_DONTEXPAND | VM_DONTDUMP' in
314e51b9 since 3.7.0-rc1, and 314e51b9 comes from a big patchset, we didn't
backport the patchset, so I restored 'VM_DNOTEXPAND | VM_DONTDUMP' as before:
-	vma-&gt;vm_flags |= VM_DONTCOPY | VM_DONTEXPAND | VM_DONTDUMP;
+	vma-&gt;vm_flags |= VM_DONTCOPY | VM_RESERVED;
 -- zliu]

Reported-and-tested-by: Vince Weaver &lt;vincent.weaver@maine.edu&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/20130604084421.GI8923@twins.programming.kicks-ass.net
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Zhouping Liu &lt;zliu@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>perf: Fix perf mmap bugs</title>
<updated>2013-07-03T17:59:06Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2013-05-28T08:55:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=535fad87e86d33ea41d4b8580fadf62f5865ae6b'/>
<id>urn:sha1:535fad87e86d33ea41d4b8580fadf62f5865ae6b</id>
<content type='text'>
commit 26cb63ad11e04047a64309362674bcbbd6a6f246 upstream.

Vince reported a problem found by his perf specific trinity
fuzzer.

Al noticed 2 problems with perf's mmap():

 - it has issues against fork() since we use vma-&gt;vm_mm for accounting.
 - it has an rb refcount leak on double mmap().

We fix the issues against fork() by using VM_DONTCOPY; I don't
think there's code out there that uses this; we didn't hear
about weird accounting problems/crashes. If we do need this to
work, the previously proposed VM_PINNED could make this work.

Aside from the rb reference leak spotted by Al, Vince's example
prog was indeed doing a double mmap() through the use of
perf_event_set_output().

This exposes another problem, since we now have 2 events with
one buffer, the accounting gets screwy because we account per
event. Fix this by making the buffer responsible for its own
accounting.

[Backporting for 3.4-stable.
VM_RESERVED flag was replaced with pair 'VM_DONTEXPAND | VM_DONTDUMP' in
314e51b9 since 3.7.0-rc1, and 314e51b9 comes from a big patchset, we didn't
backport the patchset, so I restored 'VM_DNOTEXPAND | VM_DONTDUMP' as before:
-       vma-&gt;vm_flags |= VM_DONTCOPY | VM_DONTEXPAND | VM_DONTDUMP;
+       vma-&gt;vm_flags |= VM_DONTCOPY | VM_RESERVED;
 -- zliu]

Reported-by: Vince Weaver &lt;vincent.weaver@maine.edu&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Link: http://lkml.kernel.org/r/20130528085548.GA12193@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Zhouping Liu &lt;zliu@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>hw_breakpoint: Use cpu_possible_mask in {reserve,release}_bp_slot()</title>
<updated>2013-07-03T17:59:01Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2013-06-20T15:50:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ed0b72ac1e4361d9aaf2922adfba4a263cc37e03'/>
<id>urn:sha1:ed0b72ac1e4361d9aaf2922adfba4a263cc37e03</id>
<content type='text'>
commit c790b0ad23f427c7522ffed264706238c57c007e upstream.

fetch_bp_busy_slots() and toggle_bp_slot() use
for_each_online_cpu(), this is obviously wrong wrt cpu_up() or
cpu_down(), we can over/under account the per-cpu numbers.

For example:

	# echo 0 &gt;&gt; /sys/devices/system/cpu/cpu1/online
	# perf record -e mem:0x10 -p 1 &amp;
	# echo 1 &gt;&gt; /sys/devices/system/cpu/cpu1/online
	# perf record -e mem:0x10,mem:0x10,mem:0x10,mem:0x10 -C1 -a &amp;
	# taskset -p 0x2 1

triggers the same WARN_ONCE("Can't find any breakpoint slot") in
arch_install_hw_breakpoint().

Reported-by: Vince Weaver &lt;vincent.weaver@maine.edu&gt;
Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Link: http://lkml.kernel.org/r/20130620155009.GA6327@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>reboot: rigrate shutdown/reboot to boot cpu</title>
<updated>2013-06-20T18:58:45Z</updated>
<author>
<name>Robin Holt</name>
<email>holt@sgi.com</email>
</author>
<published>2013-06-12T21:04:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fc1cbc74d5de169112578e4479d48408b222e325'/>
<id>urn:sha1:fc1cbc74d5de169112578e4479d48408b222e325</id>
<content type='text'>
commit cf7df378aa4ff7da3a44769b7ff6e9eef1a9f3db upstream.

We recently noticed that reboot of a 1024 cpu machine takes approx 16
minutes of just stopping the cpus.  The slowdown was tracked to commit
f96972f2dc63 ("kernel/sys.c: call disable_nonboot_cpus() in
kernel_restart()").

The current implementation does all the work of hot removing the cpus
before halting the system.  We are switching to just migrating to the
boot cpu and then continuing with shutdown/reboot.

This also has the effect of not breaking x86's command line parameter
for specifying the reboot cpu.  Note, this code was shamelessly copied
from arch/x86/kernel/reboot.c with bits removed pertaining to the
reboot_cpu command line parameter.

Signed-off-by: Robin Holt &lt;holt@sgi.com&gt;
Tested-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Cc: "Srivatsa S. Bhat" &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Russ Anderson &lt;rja@sgi.com&gt;
Cc: Robin Holt &lt;holt@sgi.com&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Guan Xuetao &lt;gxt@mprc.pku.edu.cn&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>CPU hotplug: provide a generic helper to disable/enable CPU hotplug</title>
<updated>2013-06-20T18:58:44Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2013-06-12T21:04:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b3cba474228862814480d40554f77e98483f41ed'/>
<id>urn:sha1:b3cba474228862814480d40554f77e98483f41ed</id>
<content type='text'>
commit 16e53dbf10a2d7e228709a7286310e629ede5e45 upstream.

There are instances in the kernel where we would like to disable CPU
hotplug (from sysfs) during some important operation.  Today the freezer
code depends on this and the code to do it was kinda tailor-made for
that.

Restructure the code and make it generic enough to be useful for other
usecases too.

Signed-off-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Robin Holt &lt;holt@sgi.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Russ Anderson &lt;rja@sgi.com&gt;
Cc: Robin Holt &lt;holt@sgi.com&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Guan Xuetao &lt;gxt@mprc.pku.edu.cn&gt;
Cc: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section</title>
<updated>2013-06-13T16:45:03Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-06-07T09:02:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bc4d36c41f16a66c320fd0282110ddc82aa1eb09'/>
<id>urn:sha1:bc4d36c41f16a66c320fd0282110ddc82aa1eb09</id>
<content type='text'>
commit 7f49ef69db6bbf756c0abca7e9b65b32e999eec8 upstream.

As ftrace_filter_lseek is now used with ftrace_pid_fops, it needs to
be moved out of the #ifdef CONFIG_DYNAMIC_FTRACE section as the
ftrace_pid_fops is defined when DYNAMIC_FTRACE is not.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
[ lizf: adjust context ]
Signed-off-by: Li Zefan &lt;lizefan@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tracing: Fix possible NULL pointer dereferences</title>
<updated>2013-06-13T16:45:03Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-06-07T09:01:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3a22cc7f184b77731816e55662cd12f0c3d24d56'/>
<id>urn:sha1:3a22cc7f184b77731816e55662cd12f0c3d24d56</id>
<content type='text'>
commit 6a76f8c0ab19f215af2a3442870eeb5f0e81998d upstream.

Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops.  However seq_open() is called only for FMODE_READ in
the fops-&gt;open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic.

It can be easily reproduced with following command:

  $ cd /sys/kernel/debug/tracing
  $ echo 1234 | sudo tee -a set_ftrace_pid

In this example, GNU coreutils' tee opens the file with fopen(, "a")
and then the fopen() internally calls lseek().

Link:
http://lkml.kernel.org/r/1365663302-2170-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;
[ lizf: adjust context ]
Signed-off-by: Li Zefan &lt;lizefan@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usermodehelper: check subprocess_info-&gt;path != NULL</title>
<updated>2013-05-19T17:54:50Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2013-05-16T15:43:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=53b4378e4f77b7ab6565d6d40559bd5eb1b34629'/>
<id>urn:sha1:53b4378e4f77b7ab6565d6d40559bd5eb1b34629</id>
<content type='text'>
commit 264b83c07a84223f0efd0d1db9ccc66d6f88288f upstream.

argv_split(empty_or_all_spaces) happily succeeds, it simply returns
argc == 0 and argv[0] == NULL. Change call_usermodehelper_exec() to
check sub_info-&gt;path != NULL to avoid the crash.

This is the minimal fix, todo:

 - perhaps we should change argv_split() to return NULL or change the
   callers.

 - kill or justify -&gt;path[0] check

 - narrow the scope of helper_lock()

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-By: Lucas De Marchi &lt;lucas.demarchi@intel.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tracing: Fix leaks of filter preds</title>
<updated>2013-05-19T17:54:40Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2013-05-14T19:40:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cba998b9b3799a5d6861a969d7b7d9b4f4f181f6'/>
<id>urn:sha1:cba998b9b3799a5d6861a969d7b7d9b4f4f181f6</id>
<content type='text'>
commit 60705c89460fdc7227f2d153b68b3f34814738a4 upstream.

Special preds are created when folding a series of preds that
can be done in serial. These are allocated in an ops field of
the pred structure. But they were never freed, causing memory
leaks.

This was discovered using the kmemleak checker:

unreferenced object 0xffff8800797fd5e0 (size 32):
  comm "swapper/0", pid 1, jiffies 4294690605 (age 104.608s)
  hex dump (first 32 bytes):
    00 00 01 00 03 00 05 00 07 00 09 00 0b 00 0d 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;ffffffff814b52af&gt;] kmemleak_alloc+0x73/0x98
    [&lt;ffffffff8111ff84&gt;] kmemleak_alloc_recursive.constprop.42+0x16/0x18
    [&lt;ffffffff81120e68&gt;] __kmalloc+0xd7/0x125
    [&lt;ffffffff810d47eb&gt;] kcalloc.constprop.24+0x2d/0x2f
    [&lt;ffffffff810d4896&gt;] fold_pred_tree_cb+0xa9/0xf4
    [&lt;ffffffff810d3781&gt;] walk_pred_tree+0x47/0xcc
    [&lt;ffffffff810d5030&gt;] replace_preds.isra.20+0x6f8/0x72f
    [&lt;ffffffff810d50b5&gt;] create_filter+0x4e/0x8b
    [&lt;ffffffff81b1c30d&gt;] ftrace_test_event_filter+0x5a/0x155
    [&lt;ffffffff8100028d&gt;] do_one_initcall+0xa0/0x137
    [&lt;ffffffff81afbedf&gt;] kernel_init_freeable+0x14d/0x1dc
    [&lt;ffffffff814b24b7&gt;] kernel_init+0xe/0xdb
    [&lt;ffffffff814d539c&gt;] ret_from_fork+0x7c/0xb0
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Tom Zanussi &lt;tzanussi@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tick: Cleanup NOHZ per cpu data on cpu down</title>
<updated>2013-05-19T17:54:40Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2013-05-03T13:02:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=33b7cfcb34b4ae37cde7a8a1c97c9be27677e931'/>
<id>urn:sha1:33b7cfcb34b4ae37cde7a8a1c97c9be27677e931</id>
<content type='text'>
commit 4b0c0f294f60abcdd20994a8341a95c8ac5eeb96 upstream.

Prarit reported a crash on CPU offline/online. The reason is that on
CPU down the NOHZ related per cpu data of the dead cpu is not cleaned
up. If at cpu online an interrupt happens before the per cpu tick
device is registered the irq_enter() check potentially sees stale data
and dereferences a NULL pointer.

Cleanup the data after the cpu is dead.

Reported-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Cc: Mike Galbraith &lt;bitbucket@online.de&gt;
Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1305031451561.2886@ionos
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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