<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/fork.c, branch v2.6.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2006-11-25T21:28:34Z</updated>
<entry>
<title>[PATCH] fix copy_process() error check</title>
<updated>2006-11-25T21:28:34Z</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2006-11-25T19:09:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=753ca4f312a4b26940e4731b4fa5dbbbbcc77e97'/>
<id>urn:sha1:753ca4f312a4b26940e4731b4fa5dbbbbcc77e97</id>
<content type='text'>
The return value of copy_process() should be checked by IS_ERR().

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>Revert "[PATCH] fix Data Acess error in dup_fd"</title>
<updated>2006-11-14T23:20:51Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@woody.osdl.org</email>
</author>
<published>2006-11-14T23:20:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9a3a04ac386f44175b6a4142eaeab3d4170a57f3'/>
<id>urn:sha1:9a3a04ac386f44175b6a4142eaeab3d4170a57f3</id>
<content type='text'>
This reverts commit 0130b0b32ee53dc7add773fcea984f6a26ef1da3.

Sergey Vlasov points out (and Vadim Lobanov concurs) that the bug it was
supposed to fix must be some unrelated memory corruption, and the "fix"
actually causes more problems:

  "However, the new code does not look safe in all cases.  If some other
   task has opened more files while dup_fd() released oldf-&gt;file_lock, the
   new code will update open_files to the new larger value.  But newf was
   allocated with the old smaller value of open_files, therefore subsequent
   accesses to newf may try to write into unallocated memory."

so revert it.

Cc: Sharyathi Nagesh &lt;sharyath@in.ibm.com&gt;
Cc: Sergey Vlasov &lt;vsu@altlinux.ru&gt;
Cc: Vadim Lobanov &lt;vlobanov@speakeasy.net&gt;
Cc: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] fix Data Acess error in dup_fd</title>
<updated>2006-11-13T15:40:43Z</updated>
<author>
<name>Sharyathi Nagesh</name>
<email>sharyath@in.ibm.com</email>
</author>
<published>2006-11-10T20:27:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0130b0b32ee53dc7add773fcea984f6a26ef1da3'/>
<id>urn:sha1:0130b0b32ee53dc7add773fcea984f6a26ef1da3</id>
<content type='text'>
On running the Stress Test on machine for more than 72 hours following
error message was observed.

0:mon&gt; e
cpu 0x0: Vector: 300 (Data Access) at [c00000007ce2f7f0]
    pc: c000000000060d90: .dup_fd+0x240/0x39c
    lr: c000000000060d6c: .dup_fd+0x21c/0x39c
    sp: c00000007ce2fa70
   msr: 800000000000b032
   dar: ffffffff00000028
 dsisr: 40000000
  current = 0xc000000074950980
  paca    = 0xc000000000454500
    pid   = 27330, comm = bash

0:mon&gt; t
[c00000007ce2fa70] c000000000060d28 .dup_fd+0x1d8/0x39c (unreliable)
[c00000007ce2fb30] c000000000060f48 .copy_files+0x5c/0x88
[c00000007ce2fbd0] c000000000061f5c .copy_process+0x574/0x1520
[c00000007ce2fcd0] c000000000062f88 .do_fork+0x80/0x1c4
[c00000007ce2fdc0] c000000000011790 .sys_clone+0x5c/0x74
[c00000007ce2fe30] c000000000008950 .ppc_clone+0x8/0xc

The problem is because of race window.  When if(expand) block is executed in
dup_fd unlocking of oldf-&gt;file_lock give a window for fdtable in oldf to be
modified.  So actual open_files in oldf may not match with open_files
variable.

Cc: Vadim Lobanov &lt;vlobanov@speakeasy.net&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] taskstats: kill -&gt;taskstats_lock in favor of -&gt;siglock</title>
<updated>2006-10-28T18:30:54Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2006-10-28T17:38:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b8534d7bd89df0cd41cd47bcd6733a05ea9a691a'/>
<id>urn:sha1:b8534d7bd89df0cd41cd47bcd6733a05ea9a691a</id>
<content type='text'>
signal_struct is (mostly) protected by -&gt;sighand-&gt;siglock, I think we don't
need -&gt;taskstats_lock to protect -&gt;stats.  This also allows us to simplify the
locking in fill_tgid().

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Jay Lan &lt;jlan@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] taskstats_tgid_free: fix usage</title>
<updated>2006-10-28T18:30:54Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2006-10-28T17:38:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=093a8e8aecd77b2799934996a55a6838e1e2b8f3'/>
<id>urn:sha1:093a8e8aecd77b2799934996a55a6838e1e2b8f3</id>
<content type='text'>
taskstats_tgid_free() is called on copy_process's error path. This is wrong.

	IF (clone_flags &amp; CLONE_THREAD)
		We should not clear -&gt;signal-&gt;taskstats, current uses it,
		it probably has a valid accumulated info.
	ELSE
		taskstats_tgid_init() set -&gt;signal-&gt;taskstats = NULL,
		there is nothing to free.

Move the callsite to __exit_signal(). We don't need any locking, entire
thread group is exiting, nobody should have a reference to soon to be
released -&gt;signal.

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Jay Lan &lt;jlan@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] rt-mutex: fixup rt-mutex debug code</title>
<updated>2006-10-17T15:18:48Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2006-10-17T07:10:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bea493a031fe3337f4fe5479e8e865513828ea76'/>
<id>urn:sha1:bea493a031fe3337f4fe5479e8e865513828ea76</id>
<content type='text'>
BUG: warning at kernel/rtmutex-debug.c:125/rt_mutex_debug_task_free() (Not tainted)
 [&lt;c04051e3&gt;] show_trace_log_lvl+0x58/0x16a
 [&lt;c04057f0&gt;] show_trace+0xd/0x10
 [&lt;c0405900&gt;] dump_stack+0x19/0x1b
 [&lt;c043f03d&gt;] rt_mutex_debug_task_free+0x35/0x6a
 [&lt;c04224c0&gt;] free_task+0x15/0x24
 [&lt;c042378c&gt;] copy_process+0x12bd/0x1324
 [&lt;c0423835&gt;] do_fork+0x42/0x113
 [&lt;c04021dd&gt;] sys_fork+0x19/0x1b
 [&lt;c0403fb7&gt;] syscall_call+0x7/0xb

In copy_process(), dup_task_struct() also duplicates the -&gt;pi_lock,
-&gt;pi_waiters and -&gt;pi_blocked_on members.  rt_mutex_debug_task_free()
called from free_task() validates these members.  However free_task() can
be invoked before these members are reset for the new task.

Move the initialization code before the first bail that can hit free_task().

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] IPC namespace - utils</title>
<updated>2006-10-02T14:57:22Z</updated>
<author>
<name>Kirill Korotaev</name>
<email>dev@openvz.org</email>
</author>
<published>2006-10-02T09:18:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=73ea41302bab5e02c9e86ab15c509494a550f1db'/>
<id>urn:sha1:73ea41302bab5e02c9e86ab15c509494a550f1db</id>
<content type='text'>
This patch adds basic IPC namespace functionality to
IPC utils:
- init_ipc_ns
- copy/clone/unshare/free IPC ns
- /proc preparations

Signed-off-by: Pavel Emelianov &lt;xemul@openvz.org&gt;
Signed-off-by: Kirill Korotaev &lt;dev@openvz.org&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] IPC namespace core</title>
<updated>2006-10-02T14:57:22Z</updated>
<author>
<name>Kirill Korotaev</name>
<email>dev@openvz.org</email>
</author>
<published>2006-10-02T09:18:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=25b21cb2f6d69b0475b134e0a3e8e269137270fa'/>
<id>urn:sha1:25b21cb2f6d69b0475b134e0a3e8e269137270fa</id>
<content type='text'>
This patch set allows to unshare IPCs and have a private set of IPC objects
(sem, shm, msg) inside namespace.  Basically, it is another building block of
containers functionality.

This patch implements core IPC namespace changes:
- ipc_namespace structure
- new config option CONFIG_IPC_NS
- adds CLONE_NEWIPC flag
- unshare support

[clg@fr.ibm.com: small fix for unshare of ipc namespace]
[akpm@osdl.org: build fix]
Signed-off-by: Pavel Emelianov &lt;xemul@openvz.org&gt;
Signed-off-by: Kirill Korotaev &lt;dev@openvz.org&gt;
Signed-off-by: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] uts: copy nsproxy only when needed</title>
<updated>2006-10-02T14:57:22Z</updated>
<author>
<name>Serge Hallyn</name>
<email>serue@us.ibm.com</email>
</author>
<published>2006-10-02T09:18:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c0b2fc316599d6cd875b6b8cafa67f03b9512b4d'/>
<id>urn:sha1:c0b2fc316599d6cd875b6b8cafa67f03b9512b4d</id>
<content type='text'>
The nsproxy was being copied in unshare() when anything was being unshared,
even if it was something not referenced from nsproxy.  This should end up
in some cases with far more memory usage than necessary.

Signed-off-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: Kirill Korotaev &lt;dev@openvz.org&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Herbert Poetzl &lt;herbert@13thfloor.at&gt;
Cc: Andrey Savochkin &lt;saw@sw.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] namespaces: utsname: implement CLONE_NEWUTS flag</title>
<updated>2006-10-02T14:57:22Z</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serue@us.ibm.com</email>
</author>
<published>2006-10-02T09:18:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=071df104f808b8195c40643dcb4d060681742e29'/>
<id>urn:sha1:071df104f808b8195c40643dcb4d060681742e29</id>
<content type='text'>
Implement a CLONE_NEWUTS flag, and use it at clone and sys_unshare.

[clg@fr.ibm.com: IPC unshare fix]
[bunk@stusta.de: cleanup]
Signed-off-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: Kirill Korotaev &lt;dev@openvz.org&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Herbert Poetzl &lt;herbert@13thfloor.at&gt;
Cc: Andrey Savochkin &lt;saw@sw.ru&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Signed-off-by: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
