<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/exit.c, branch v2.6.31.2</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.31.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.31.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2009-07-08T16:31:56Z</updated>
<entry>
<title>headers: mnt_namespace.h redux</title>
<updated>2009-07-08T16:31:56Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2009-07-07T21:54:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b43f3cbd21ffbd719fd4fa6642bfe6af255ded34'/>
<id>urn:sha1:b43f3cbd21ffbd719fd4fa6642bfe6af255ded34</id>
<content type='text'>
Fix various silly problems wrt mnt_namespace.h:

 - exit_mnt_ns() isn't used, remove it
 - done that, sched.h and nsproxy.h inclusions aren't needed
 - mount.h inclusion was need for vfsmount_lock, but no longer
 - remove mnt_namespace.h inclusion from files which don't use anything
   from mnt_namespace.h

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ptrace: wait_task_zombie: do not account traced sub-threads</title>
<updated>2009-06-19T23:46:06Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2009-06-18T23:49:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=befca96779b0259ac8fad0183e748a62935c39cb'/>
<id>urn:sha1:befca96779b0259ac8fad0183e748a62935c39cb</id>
<content type='text'>
The bug is ancient.

If we trace the sub-thread of our natural child and this sub-thread exits,
we update parent-&gt;signal-&gt;cxxx fields.  But we should not do this until
the whole thread-group exits, otherwise we account this thread (and all
other live threads) twice.

Add the task_detached() check.  No need to check thread_group_empty(),
wait_consider_task()-&gt;delay_group_leader() already did this.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Cc: Vitaly Mayatskikh &lt;vmayatsk@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm: exit.c reorder wait_opts to remove padding on 64 bit builds</title>
<updated>2009-06-18T20:03:53Z</updated>
<author>
<name>Richard Kennedy</name>
<email>richard@rsk.demon.co.uk</email>
</author>
<published>2009-06-17T23:27:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e1eb1ebcca871673c76caf63335c4237680040f1'/>
<id>urn:sha1:e1eb1ebcca871673c76caf63335c4237680040f1</id>
<content type='text'>
Reorder struct wait_opts to remove 8 bytes of alignment padding on 64 bit
builds.

Signed-off-by: Richard Kennedy &lt;richard@rsk.demon.co.uk&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>do_wait: fix the theoretical race with stop/trace/cont</title>
<updated>2009-06-18T20:03:53Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2009-06-17T23:27:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f95d39d10fe7d47336e65172f52bf64e0096f983'/>
<id>urn:sha1:f95d39d10fe7d47336e65172f52bf64e0096f983</id>
<content type='text'>
do_wait:

	current-&gt;state = TASK_INTERRUPTIBLE;

	read_lock(&amp;tasklist_lock);
	... search for the task to reap ...

In theory, the -&gt;state changing can leak into the critical section.  Since
the child can change its status under read_lock(tasklist) in parallel
(finish_stop/ptrace_stop), we can miss the wakeup if __wake_up_parent()
sees us in TASK_RUNNING state.  Add the barrier.

Also, use __set_current_state() to set TASK_RUNNING.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>do_wait: kill the old BUG_ON, use while_each_thread()</title>
<updated>2009-06-18T20:03:53Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2009-06-17T23:27:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a3f6dfb7295facb0505b5beca5a7ce48b0612379'/>
<id>urn:sha1:a3f6dfb7295facb0505b5beca5a7ce48b0612379</id>
<content type='text'>
do_wait() does BUG_ON(tsk-&gt;signal != current-&gt;signal), this looks like a
raher obsolete check.  At least, I don't think do_wait() is the best place
to verify that all threads have the same -&gt;signal.  Remove it.

Also, change the code to use while_each_thread().

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>do_wait: simplify retval/tsk_result/notask_error mess</title>
<updated>2009-06-18T20:03:53Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2009-06-17T23:27:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=64a16caf5e3417ee32f670debcb5857b02a9e08e'/>
<id>urn:sha1:64a16caf5e3417ee32f670debcb5857b02a9e08e</id>
<content type='text'>
Now that we don't pass &amp;retval down to other helpers we can simplify
the code more.

- kill tsk_result, just use retval

- add the "notask" label right after the main loop, and
  s/got end/goto notask/ after the fastpath pid check.

  This way we don't need to initialize retval before this
  check and the code becomes a bit more clean, if this pid
  has no attached tasks we should just skip the list search.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>introduce "struct wait_opts" to simplify do_wait() patches</title>
<updated>2009-06-18T20:03:52Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2009-06-17T23:27:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9e8ae01d1c86dcaa6443c897662545d088036e4c'/>
<id>urn:sha1:9e8ae01d1c86dcaa6443c897662545d088036e4c</id>
<content type='text'>
Introduce "struct wait_opts" which holds the parameters for misc helpers
in do_wait() pathes.

This adds 13 lines to kernel/exit.c, but saves 256 bytes from .o and imho
makes the code much more readable.

This patch temporary uglifies rusage/siginfo code a little bit, will be
addressed by further cleanups.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Reviewed-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>shift "ptrace implies WUNTRACED" from ptrace_do_wait() to wait_task_stopped()</title>
<updated>2009-06-18T20:03:52Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2009-06-17T23:27:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=47918025efdabd34e96b13b26eb2cf2fd6fd1f7c'/>
<id>urn:sha1:47918025efdabd34e96b13b26eb2cf2fd6fd1f7c</id>
<content type='text'>
No functional changes, preparation for the next patch.

ptrace_do_wait() adds WUNTRACED to options for wait_task_stopped() which
should always accept the stopped tracee, even if do_wait() was called
without WUNTRACED.

Change wait_task_stopped() to check "ptrace || WUNTRACED" instead.  This
makes the code more explicit, and "int options" argument becomes const in
do_wait() pathes.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>wait_task_zombie: do not use thread_group_cputime()</title>
<updated>2009-06-18T20:03:52Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2009-06-17T23:27:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=77d1ef79568b337f599b75795acc8f78a87ba9ba'/>
<id>urn:sha1:77d1ef79568b337f599b75795acc8f78a87ba9ba</id>
<content type='text'>
There is no reason for thread_group_cputime() in wait_task_zombie(), there
must be no other threads.

This call was previously needed to collect the per-cpu data which we do
not have any longer.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Cc: Vitaly Mayatskikh &lt;vmayatsk@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ptrace: wait_task_zombie: s/-&gt;parent/-&gt;real_parent/</title>
<updated>2009-06-18T20:03:51Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2009-06-17T23:27:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d1e98f429aa10132b3010ba3b0be47552a2eb14b'/>
<id>urn:sha1:d1e98f429aa10132b3010ba3b0be47552a2eb14b</id>
<content type='text'>
Change wait_task_zombie() to use -&gt;real_parent instead of -&gt;parent.  We
could even use current afaics, but -&gt;real_parent is more clean.

We know that the child is not ptrace_reparented() and thus they are equal.
 But we should avoid using task_struct-&gt;parent, we are going to remove it.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
