<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel, branch v3.2.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel?h=v3.2.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel?h=v3.2.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-01-26T00:13:57Z</updated>
<entry>
<title>kprobes: initialize before using a hlist</title>
<updated>2012-01-26T00:13:57Z</updated>
<author>
<name>Ananth N Mavinakayanahalli</name>
<email>ananth@in.ibm.com</email>
</author>
<published>2012-01-20T22:34:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6ee7663e972835367a550bd6b9fecc1a9dc14ce1'/>
<id>urn:sha1:6ee7663e972835367a550bd6b9fecc1a9dc14ce1</id>
<content type='text'>
commit d496aab567e7e52b3e974c9192a5de6e77dce32c upstream.

Commit ef53d9c5e ("kprobes: improve kretprobe scalability with hashed
locking") introduced a bug where we can potentially leak
kretprobe_instances since we initialize a hlist head after having used
it.

Initialize the hlist head before using it.

Reported by: Jim Keniston &lt;jkenisto@us.ibm.com&gt;
Acked-by: Jim Keniston &lt;jkenisto@us.ibm.com&gt;
Signed-off-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Srinivasa D S &lt;srinivasa@in.ibm.com&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@suse.de&gt;

</content>
</entry>
<entry>
<title>tracepoints/module: Fix disabling tracepoints with taint CRAP or OOT</title>
<updated>2012-01-26T00:13:52Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2012-01-14T02:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8962e9fcab14954ac4489089827e24e8c29f7038'/>
<id>urn:sha1:8962e9fcab14954ac4489089827e24e8c29f7038</id>
<content type='text'>
commit c10076c4304083af15a41f6bc5e657e781c1f9a6 upstream.

Tracepoints are disabled for tainted modules, which is usually because the
module is either proprietary or was forced, and we don't want either of them
using kernel tracepoints.

But, a module can also be tainted by being in the staging directory or
compiled out of tree. Either is fine for use with tracepoints, no need
to punish them.  I found this out when I noticed that my sample trace event
module, when done out of tree, stopped working.

Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Dave Jones &lt;davej@redhat.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ftrace: Fix unregister ftrace_ops accounting</title>
<updated>2012-01-26T00:13:29Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@redhat.com</email>
</author>
<published>2011-12-05T17:22:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=afe62ad1ea1e3e6e9f36ad115ad435a587cb23e7'/>
<id>urn:sha1:afe62ad1ea1e3e6e9f36ad115ad435a587cb23e7</id>
<content type='text'>
commit 30fb6aa74011dcf595f306ca2727254d708b786e upstream.

Multiple users of the function tracer can register their functions
with the ftrace_ops structure. The accounting within ftrace will
update the counter on each function record that is being traced.
When the ftrace_ops filtering adds or removes functions, the
function records will be updated accordingly if the ftrace_ops is
still registered.

When a ftrace_ops is removed, the counter of the function records,
that the ftrace_ops traces, are decremented. When they reach zero
the functions that they represent are modified to stop calling the
mcount code.

When changes are made, the code is updated via stop_machine() with
a command passed to the function to tell it what to do. There is an
ENABLE and DISABLE command that tells the called function to enable
or disable the functions. But the ENABLE is really a misnomer as it
should just update the records, as records that have been enabled
and now have a count of zero should be disabled.

The DISABLE command is used to disable all functions regardless of
their counter values. This is the big off switch and is not the
complement of the ENABLE command.

To make matters worse, when a ftrace_ops is unregistered and there
is another ftrace_ops registered, neither the DISABLE nor the
ENABLE command are set when calling into the stop_machine() function
and the records will not be updated to match their counter. A command
is passed to that function that will update the mcount code to call
the registered callback directly if it is the only one left. This
means that the ftrace_ops that is still registered will have its callback
called by all functions that have been set for it as well as the ftrace_ops
that was just unregistered.

Here's a way to trigger this bug. Compile the kernel with
CONFIG_FUNCTION_PROFILER set and with CONFIG_FUNCTION_GRAPH not set:

 CONFIG_FUNCTION_PROFILER=y
 # CONFIG_FUNCTION_GRAPH is not set

This will force the function profiler to use the function tracer instead
of the function graph tracer.

  # cd /sys/kernel/debug/tracing
  # echo schedule &gt; set_ftrace_filter
  # echo function &gt; current_tracer
  # cat set_ftrace_filter
 schedule
  # cat trace
 # tracer: nop
 #
 # entries-in-buffer/entries-written: 692/68108025   #P:4
 #
 #                              _-----=&gt; irqs-off
 #                             / _----=&gt; need-resched
 #                            | / _---=&gt; hardirq/softirq
 #                            || / _--=&gt; preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
      kworker/0:2-909   [000] ....   531.235574: schedule &lt;-worker_thread
           &lt;idle&gt;-0     [001] .N..   531.235575: schedule &lt;-cpu_idle
      kworker/0:2-909   [000] ....   531.235597: schedule &lt;-worker_thread
             sshd-2563  [001] ....   531.235647: schedule &lt;-schedule_hrtimeout_range_clock

  # echo 1 &gt; function_profile_enabled
  # echo 0 &gt; function_porfile_enabled
  # cat set_ftrace_filter
 schedule
  # cat trace
 # tracer: function
 #
 # entries-in-buffer/entries-written: 159701/118821262   #P:4
 #
 #                              _-----=&gt; irqs-off
 #                             / _----=&gt; need-resched
 #                            | / _---=&gt; hardirq/softirq
 #                            || / _--=&gt; preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
           &lt;idle&gt;-0     [002] ...1   604.870655: local_touch_nmi &lt;-cpu_idle
           &lt;idle&gt;-0     [002] d..1   604.870655: enter_idle &lt;-cpu_idle
           &lt;idle&gt;-0     [002] d..1   604.870656: atomic_notifier_call_chain &lt;-enter_idle
           &lt;idle&gt;-0     [002] d..1   604.870656: __atomic_notifier_call_chain &lt;-atomic_notifier_call_chain

The same problem could have happened with the trace_probe_ops,
but they are modified with the set_frace_filter file which does the
update at closure of the file.

The simple solution is to change ENABLE to UPDATE and call it every
time an ftrace_ops is unregistered.

Link: http://lkml.kernel.org/r/1323105776-26961-3-git-send-email-jolsa@redhat.com

Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>cgroup: fix to allow mounting a hierarchy by name</title>
<updated>2012-01-12T19:29:35Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2011-12-27T06:25:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=62cf6918d66acca738688658e33f9686ab174d94'/>
<id>urn:sha1:62cf6918d66acca738688658e33f9686ab174d94</id>
<content type='text'>
commit 0d19ea866562e46989412a0676412fa0983c9ce7 upstream.

If we mount a hierarchy with a specified name, the name is unique,
and we can use it to mount the hierarchy without specifying its
set of subsystem names. This feature is documented is
Documentation/cgroups/cgroups.txt section 2.3

Here's an example:

	# mount -t cgroup -o cpuset,name=myhier xxx /cgroup1
	# mount -t cgroup -o name=myhier xxx /cgroup2

But it was broken by commit 32a8cf235e2f192eb002755076994525cdbaa35a
(cgroup: make the mount options parsing more accurate)

This fixes the regression.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ptrace: ensure JOBCTL_STOP_SIGMASK is not zero after detach</title>
<updated>2012-01-04T23:01:59Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2012-01-04T16:29:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8a88951b5878dc475dcd841cefc767e36397d14e'/>
<id>urn:sha1:8a88951b5878dc475dcd841cefc767e36397d14e</id>
<content type='text'>
This is the temporary simple fix for 3.2, we need more changes in this
area.

1. do_signal_stop() assumes that the running untraced thread in the
   stopped thread group is not possible. This was our goal but it is
   not yet achieved: a stopped-but-resumed tracee can clone the running
   thread which can initiate another group-stop.

   Remove WARN_ON_ONCE(!current-&gt;ptrace).

2. A new thread always starts with -&gt;jobctl = 0. If it is auto-attached
   and this group is stopped, __ptrace_unlink() sets JOBCTL_STOP_PENDING
   but JOBCTL_STOP_SIGMASK part is zero, this triggers WANR_ON(!signr)
   in do_jobctl_trap() if another debugger attaches.

   Change __ptrace_unlink() to set the artificial SIGSTOP for report.

   Alternatively we could change ptrace_init_task() to copy signr from
   current, but this means we can copy it for no reason and hide the
   possible similar problems.

Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: &lt;stable@kernel.org&gt;		[3.1]
Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ptrace: partially fix the do_wait(WEXITED) vs EXIT_DEAD-&gt;EXIT_ZOMBIE race</title>
<updated>2012-01-04T23:01:59Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2012-01-04T16:29:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=50b8d257486a45cba7b65ca978986ed216bbcc10'/>
<id>urn:sha1:50b8d257486a45cba7b65ca978986ed216bbcc10</id>
<content type='text'>
Test-case:

	int main(void)
	{
		int pid, status;

		pid = fork();
		if (!pid) {
			for (;;) {
				if (!fork())
					return 0;
				if (waitpid(-1, &amp;status, 0) &lt; 0) {
					printf("ERR!! wait: %m\n");
					return 0;
				}
			}
		}

		assert(ptrace(PTRACE_ATTACH, pid, 0,0) == 0);
		assert(waitpid(-1, NULL, 0) == pid);

		assert(ptrace(PTRACE_SETOPTIONS, pid, 0,
					PTRACE_O_TRACEFORK) == 0);

		do {
			ptrace(PTRACE_CONT, pid, 0, 0);
			pid = waitpid(-1, NULL, 0);
		} while (pid &gt; 0);

		return 1;
	}

It fails because -&gt;real_parent sees its child in EXIT_DEAD state
while the tracer is going to change the state back to EXIT_ZOMBIE
in wait_task_zombie().

The offending commit is 823b018e which moved the EXIT_DEAD check,
but in fact we should not blame it. The original code was not
correct as well because it didn't take ptrace_reparented() into
account and because we can't really trust -&gt;ptrace.

This patch adds the additional check to close this particular
race but it doesn't solve the whole problem. We simply can't
rely on -&gt;ptrace in this case, it can be cleared if the tracer
is multithreaded by the exiting -&gt;parent.

I think we should kill EXIT_DEAD altogether, we should always
remove the soon-to-be-reaped child from -&gt;children or at least
we should never do the DEAD-&gt;ZOMBIE transition. But this is too
complex for 3.2.

Reported-and-tested-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
Tested-by: Lukasz Michalik &lt;lmi@ift.uni.wroc.pl&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: &lt;stable@kernel.org&gt;		[3.0+]
Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>hung_task: fix false positive during vfork</title>
<updated>2012-01-04T00:14:32Z</updated>
<author>
<name>Mandeep Singh Baines</name>
<email>msb@chromium.org</email>
</author>
<published>2012-01-03T22:41:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f9fab10bbd768b0e5254e53a4a8477a94bfc4b96'/>
<id>urn:sha1:f9fab10bbd768b0e5254e53a4a8477a94bfc4b96</id>
<content type='text'>
vfork parent uninterruptibly and unkillably waits for its child to
exec/exit. This wait is of unbounded length. Ignore such waits
in the hung_task detector.

Signed-off-by: Mandeep Singh Baines &lt;msb@chromium.org&gt;
Reported-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
LKML-Reference: &lt;1325344394.28904.43.camel@lappy&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: John Kacur &lt;jkacur@redhat.com&gt;
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>futex: Fix uninterruptible loop due to gate_area</title>
<updated>2011-12-31T19:48:28Z</updated>
<author>
<name>Hugh Dickins</name>
<email>hughd@google.com</email>
</author>
<published>2011-12-31T19:44:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e6780f7243eddb133cc20ec37fa69317c218b709'/>
<id>urn:sha1:e6780f7243eddb133cc20ec37fa69317c218b709</id>
<content type='text'>
It was found (by Sasha) that if you use a futex located in the gate
area we get stuck in an uninterruptible infinite loop, much like the
ZERO_PAGE issue.

While looking at this problem, PeterZ realized you'll get into similar
trouble when hitting any install_special_pages() mapping.  And are there
still drivers setting up their own special mmaps without page-&gt;mapping,
and without special VM or pte flags to make get_user_pages fail?

In most cases, if page-&gt;mapping is NULL, we do not need to retry at all:
Linus points out that even /proc/sys/vm/drop_caches poses no problem,
because it ends up using remove_mapping(), which takes care not to
interfere when the page reference count is raised.

But there is still one case which does need a retry: if memory pressure
called shmem_writepage in between get_user_pages_fast dropping page
table lock and our acquiring page lock, then the page gets switched from
filecache to swapcache (and -&gt;mapping set to NULL) whatever the refcount.
Fault it back in to get the page-&gt;mapping needed for key-&gt;shared.inode.

Reported-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Signed-off-by: Hugh Dickins &lt;hughd@google.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "clockevents: Set noop handler in clockevents_exchange_device()"</title>
<updated>2011-12-30T21:24:40Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-12-30T21:24:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3b87487ac5008072f138953b07505a7e3493327f'/>
<id>urn:sha1:3b87487ac5008072f138953b07505a7e3493327f</id>
<content type='text'>
This reverts commit de28f25e8244c7353abed8de0c7792f5f883588c.

It results in resume problems for various people. See for example

  http://thread.gmane.org/gmane.linux.kernel/1233033
  http://thread.gmane.org/gmane.linux.kernel/1233389
  http://thread.gmane.org/gmane.linux.kernel/1233159
  http://thread.gmane.org/gmane.linux.kernel/1227868/focus=1230877

and the fedora and ubuntu bug reports

  https://bugzilla.redhat.com/show_bug.cgi?id=767248
  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/904569

which got bisected down to the stable version of this commit.

Reported-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Reported-by: Phil Miller &lt;mille121@illinois.edu&gt;
Reported-by: Philip Langdale &lt;philipl@overt.org&gt;
Reported-by: Tim Gardner &lt;tim.gardner@canonical.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Greg KH &lt;gregkh@suse.de&gt;
Cc: stable@kernel.org    # for stable kernels that applied the original
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup</title>
<updated>2011-12-20T19:44:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-12-20T19:44:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a4a4923919f2d43583789b1f3603f4e5600d8321'/>
<id>urn:sha1:a4a4923919f2d43583789b1f3603f4e5600d8321</id>
<content type='text'>
* 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
  cgroups: fix a css_set not found bug in cgroup_attach_proc
</content>
</entry>
</feed>
