<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux, branch v3.4.52</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/?h=v3.4.52</id>
<link rel='self' href='https://git.amat.us/linux/atom/?h=v3.4.52'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-07-03T18:00:43Z</updated>
<entry>
<title>Linux 3.4.52</title>
<updated>2013-07-03T18:00:43Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-07-03T18:00:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ad7d5b07040bb8073bf14a661e60e94b87377df9'/>
<id>urn:sha1:ad7d5b07040bb8073bf14a661e60e94b87377df9</id>
<content type='text'>
</content>
</entry>
<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>pch_uart: fix a deadlock when pch_uart as console</title>
<updated>2013-07-03T17:59:05Z</updated>
<author>
<name>Liang Li</name>
<email>liang.li@windriver.com</email>
</author>
<published>2013-01-19T09:52:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5d2a2c717306c11672aef8ca6a1535ff78f57fa8'/>
<id>urn:sha1:5d2a2c717306c11672aef8ca6a1535ff78f57fa8</id>
<content type='text'>
commit 384e301e3519599b000c1a2ecd938b533fc15d85 upstream.

When we use pch_uart as system console like 'console=ttyPCH0,115200',
then 'send break' to it. We'll encounter the deadlock on a cpu/core,
with interrupts disabled on the core. When we happen to have all irqs
affinity to cpu0 then the deadlock on cpu0 actually deadlock whole
system.

In pch_uart_interrupt, we have spin_lock_irqsave(&amp;priv-&gt;lock, flags)
then call pch_uart_err_ir when break is received. Then the call to
dev_err would actually call to pch_console_write then we'll run into
another spin_lock(&amp;priv-&gt;lock), with interrupts disabled.

So in the call sequence lead by pch_uart_interrupt, we should be
carefully to call functions that will 'print message to console' only
in case the uart port is not being used as serial console.

Signed-off-by: Liang Li &lt;liang.li@windriver.com&gt;
Cc: Yijing Wang &lt;wangyijing@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>UBIFS: fix a horrid bug</title>
<updated>2013-07-03T17:59:05Z</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2013-06-28T11:15:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4e3010bf3aab410b6a983fcd05fe65e671648f55'/>
<id>urn:sha1:4e3010bf3aab410b6a983fcd05fe65e671648f55</id>
<content type='text'>
commit 605c912bb843c024b1ed173dc427cd5c08e5d54d upstream.

Al Viro pointed me to the fact that '-&gt;readdir()' and '-&gt;llseek()' have no
mutual exclusion, which means the 'ubifs_dir_llseek()' can be run while we are
in the middle of 'ubifs_readdir()'.

This means that 'file-&gt;private_data' can be freed while 'ubifs_readdir()' uses
it, and this is a very bad bug: not only 'ubifs_readdir()' can return garbage,
but this may corrupt memory and lead to all kinds of problems like crashes an
security holes.

This patch fixes the problem by using the 'file-&gt;f_version' field, which
'-&gt;llseek()' always unconditionally sets to zero. We set it to 1 in
'ubifs_readdir()' and whenever we detect that it became 0, we know there was a
seek and it is time to clear the state saved in 'file-&gt;private_data'.

I tested this patch by writing a user-space program which runds readdir and
seek in parallell. I could easily crash the kernel without these patches, but
could not crash it with these patches.

Reported-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Tested-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>UBIFS: prepare to fix a horrid bug</title>
<updated>2013-07-03T17:59:05Z</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2013-06-28T11:15:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eafde0bc4fbb118408050b7f32dde3575930ef16'/>
<id>urn:sha1:eafde0bc4fbb118408050b7f32dde3575930ef16</id>
<content type='text'>
commit 33f1a63ae84dfd9ad298cf275b8f1887043ced36 upstream.

Al Viro pointed me to the fact that '-&gt;readdir()' and '-&gt;llseek()' have no
mutual exclusion, which means the 'ubifs_dir_llseek()' can be run while we are
in the middle of 'ubifs_readdir()'.

First of all, this means that 'file-&gt;private_data' can be freed while
'ubifs_readdir()' uses it.  But this particular patch does not fix the problem.
This patch is only a preparation, and the fix will follow next.

In this patch we make 'ubifs_readdir()' stop using 'file-&gt;f_pos' directly,
because 'file-&gt;f_pos' can be changed by '-&gt;llseek()' at any point. This may
lead 'ubifs_readdir()' to returning inconsistent data: directory entry names
may correspond to incorrect file positions.

So here we introduce a local variable 'pos', read 'file-&gt;f_pose' once at very
the beginning, and then stick to 'pos'. The result of this is that when
'ubifs_dir_llseek()' changes 'file-&gt;f_pos' while we are in the middle of
'ubifs_readdir()', the latter "wins".

Reported-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Tested-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>perf: Disable monitoring on setuid processes for regular users</title>
<updated>2013-07-03T17:59:04Z</updated>
<author>
<name>Stephane Eranian</name>
<email>eranian@google.com</email>
</author>
<published>2013-06-20T09:36:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f57f135abe8d94c8d83763de99b01d223b60e1df'/>
<id>urn:sha1:f57f135abe8d94c8d83763de99b01d223b60e1df</id>
<content type='text'>
commit 2976b10f05bd7f6dab9f9e7524451ddfed656a89 upstream.

There was a a bug in setup_new_exec(), whereby
the test to disabled perf monitoring was not
correct because the new credentials for the
process were not yet committed and therefore
the get_dumpable() test was never firing.

The patch fixes the problem by moving the
perf_event test until after the credentials
are committed.

Signed-off-by: Stephane Eranian &lt;eranian@google.com&gt;
Tested-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&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>dlci: validate the net device in dlci_del()</title>
<updated>2013-07-03T17:59:04Z</updated>
<author>
<name>Zefan Li</name>
<email>lizefan@huawei.com</email>
</author>
<published>2013-06-26T07:31:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7e6932300a88ed1dfb2aa0f650aecc51e7839634'/>
<id>urn:sha1:7e6932300a88ed1dfb2aa0f650aecc51e7839634</id>
<content type='text'>
commit 578a1310f2592ba90c5674bca21c1dbd1adf3f0a upstream.

We triggered an oops while running trinity with 3.4 kernel:

BUG: unable to handle kernel paging request at 0000000100000d07
IP: [&lt;ffffffffa0109738&gt;] dlci_ioctl+0xd8/0x2d4 [dlci]
PGD 640c0d067 PUD 0
Oops: 0000 [#1] PREEMPT SMP
CPU 3
...
Pid: 7302, comm: trinity-child3 Not tainted 3.4.24.09+ 40 Huawei Technologies Co., Ltd. Tecal RH2285          /BC11BTSA
RIP: 0010:[&lt;ffffffffa0109738&gt;]  [&lt;ffffffffa0109738&gt;] dlci_ioctl+0xd8/0x2d4 [dlci]
...
Call Trace:
  [&lt;ffffffff8137c5c3&gt;] sock_ioctl+0x153/0x280
  [&lt;ffffffff81195494&gt;] do_vfs_ioctl+0xa4/0x5e0
  [&lt;ffffffff8118354a&gt;] ? fget_light+0x3ea/0x490
  [&lt;ffffffff81195a1f&gt;] sys_ioctl+0x4f/0x80
  [&lt;ffffffff81478b69&gt;] system_call_fastpath+0x16/0x1b
...

It's because the net device is not a dlci device.

Reported-by: Li Jinyue &lt;lijinyue@huawei.com&gt;
Signed-off-by: Li Zefan &lt;lizefan@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dlci: acquire rtnl_lock before calling __dev_get_by_name()</title>
<updated>2013-07-03T17:59:03Z</updated>
<author>
<name>Zefan Li</name>
<email>lizefan@huawei.com</email>
</author>
<published>2013-06-26T07:29:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eadc8331866c462ce8ff807d42abd0038d8cb763'/>
<id>urn:sha1:eadc8331866c462ce8ff807d42abd0038d8cb763</id>
<content type='text'>
commit 11eb2645cbf38a08ae491bf6c602eea900ec0bb5 upstream.

Otherwise the net device returned can be freed at anytime.

Signed-off-by: Li Zefan &lt;lizefan@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&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>
</feed>
