<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/kernel/fork.c, branch linux-2.6.29.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.29.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.29.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-05-08T22:45:08Z</updated>
<entry>
<title>New locking/refcounting for fs_struct</title>
<updated>2009-05-08T22:45:08Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2009-03-30T11:20:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d093166dbab62418c468481891cdfbc70e3c73f9'/>
<id>urn:sha1:d093166dbab62418c468481891cdfbc70e3c73f9</id>
<content type='text'>
commit 498052bba55ecaff58db6a1436b0e25bfd75a7ff upstream.

* all changes of current-&gt;fs are done under task_lock and write_lock of
  old fs-&gt;lock
* refcount is not atomic anymore (same protection)
* its decrements are done when removing reference from current; at the
  same time we decide whether to free it.
* put_fs_struct() is gone
* new field - -&gt;in_exec.  Set by check_unsafe_exec() if we are trying to do
  execve() and only subthreads share fs_struct.  Cleared when finishing exec
  (success and failure alike).  Makes CLONE_FS fail with -EAGAIN if set.
* check_unsafe_exec() may fail with -EAGAIN if another execve() from subthread
  is in progress.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Take fs_struct handling to new file (fs/fs_struct.c)</title>
<updated>2009-05-08T22:45:07Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2009-03-29T23:00:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=83e8c55f17f8d55f755b8983e1192cf1e1f711cd'/>
<id>urn:sha1:83e8c55f17f8d55f755b8983e1192cf1e1f711cd</id>
<content type='text'>
commit 3e93cd671813e204c258f1e6c797959920cf7772 upstream.

Pure code move; two new helper functions for nfsd and daemonize
(unshare_fs_struct() and daemonize_fs_struct() resp.; for now -
the same code as used to be in callers).  unshare_fs_struct()
exported (for nfsd, as copy_fs_struct()/exit_fs() used to be),
copy_fs_struct() and exit_fs() don't need exports anymore.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>posix-timers: fix RLIMIT_CPU &amp;&amp; fork()</title>
<updated>2009-04-27T17:36:59Z</updated>
<author>
<name>Oleg Nesterov</name>
</author>
<published>2009-04-09T18:20:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3fe90c4dc50b1c4030d73d196a5d812ea906a4c9'/>
<id>urn:sha1:3fe90c4dc50b1c4030d73d196a5d812ea906a4c9</id>
<content type='text'>
upstream commit: 6279a751fe096a21dc7704e918d570d3ff06e769

See http://bugzilla.kernel.org/show_bug.cgi?id=12911

copy_signal() copies signal-&gt;rlim, but RLIMIT_CPU is "lost". Because
posix_cpu_timers_init_group() sets cputime_expires.prof_exp = 0 and thus
fastpath_timer_check() returns false unless we have other expired cpu timers.

Change copy_signal() to set cputime_expires.prof_exp if we have RLIMIT_CPU.
Also, set cputimer.running = 1 in that case. This is not strictly necessary,
but imho makes sense.

Reported-by: Peter Lojkin &lt;ia6432@inbox.ru&gt;
Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Peter Lojkin &lt;ia6432@inbox.ru&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
Cc: stable@kernel.org
LKML-Reference: &lt;20090327000607.GA10104@redhat.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
</content>
</entry>
<entry>
<title>copy_process: fix CLONE_PARENT &amp;&amp; parent_exec_id interaction</title>
<updated>2009-03-09T20:23:25Z</updated>
<author>
<name>Oleg Nesterov</name>
</author>
<published>2009-03-02T21:58:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d5516cbb9daf7d0e342a2e3b0fc6f8c39a81205'/>
<id>urn:sha1:2d5516cbb9daf7d0e342a2e3b0fc6f8c39a81205</id>
<content type='text'>
CLONE_PARENT can fool the -&gt;self_exec_id/parent_exec_id logic. If we
re-use the old parent, we must also re-use -&gt;parent_exec_id to make
sure exit_notify() sees the right -&gt;xxx_exec_id's when the CLONE_PARENT'ed
task exits.

Also, move down the "p-&gt;parent_exec_id = p-&gt;self_exec_id" thing, to place
two different cases together.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Serge E. Hallyn &lt;serge@hallyn.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-02-11T16:24:32Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2009-02-11T16:24:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94dba895333a4321f27360e42b807260ae36bda4'/>
<id>urn:sha1:94dba895333a4321f27360e42b807260ae36bda4</id>
<content type='text'>
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  timers: fix TIMER_ABSTIME for process wide cpu timers
  timers: split process wide cpu clocks/timers, fix
  x86: clean up hpet timer reinit
  timers: split process wide cpu clocks/timers, remove spurious warning
  timers: split process wide cpu clocks/timers
  signal: re-add dead task accumulation stats.
  x86: fix hpet timer reinit for x86_64
  sched: fix nohz load balancer on cpu offline
</content>
</entry>
<entry>
<title>Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-02-11T16:23:22Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2009-02-11T16:23:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ce04f9238cafcfd09a502f2bc8c13b5f44ec590'/>
<id>urn:sha1:9ce04f9238cafcfd09a502f2bc8c13b5f44ec590</id>
<content type='text'>
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ptrace, x86: fix the usage of ptrace_fork()
  i8327: fix outb() parameter order
  x86: fix math_emu register frame access
  x86: math_emu info cleanup
  x86: include correct %gs in a.out core dump
  x86, vmi: put a missing paravirt_release_pmd in pgd_dtor
  x86: find nr_irqs_gsi with mp_ioapic_routing
  x86: add clflush before monitor for Intel 7400 series
  x86: disable intel_iommu support by default
  x86: don't apply __supported_pte_mask to non-present ptes
  x86: fix grammar in user-visible BIOS warning
  x86/Kconfig.cpu: make Kconfig help readable in the console
  x86, 64-bit: print DMI info in the oops trace
</content>
</entry>
<entry>
<title>ptrace, x86: fix the usage of ptrace_fork()</title>
<updated>2009-02-11T09:32:46Z</updated>
<author>
<name>Oleg Nesterov</name>
</author>
<published>2009-02-09T01:02:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=06eb23b1ba39c61ee5d5faeb42a097635693e370'/>
<id>urn:sha1:06eb23b1ba39c61ee5d5faeb42a097635693e370</id>
<content type='text'>
I noticed by pure accident we have ptrace_fork() and friends. This was
added by "x86, bts: add fork and exit handling", commit
bf53de907dfdaac178c92d774aae7370d7b97d20.

I can't test this, ds_request_bts() returns -EOPNOTSUPP, but I strongly
believe this needs the fix. I think something like this program

	int main(void)
	{
		int pid = fork();

		if (!pid) {
			ptrace(PTRACE_TRACEME, 0, NULL, NULL);
			kill(getpid(), SIGSTOP);
			fork();
		} else {
			struct ptrace_bts_config bts = {
				.flags = PTRACE_BTS_O_ALLOC,
				.size  = 4 * 4096,
			};

			wait(NULL);

			ptrace(PTRACE_SETOPTIONS, pid, NULL, PTRACE_O_TRACEFORK);
			ptrace(PTRACE_BTS_CONFIG, pid, &amp;bts, sizeof(bts));
			ptrace(PTRACE_CONT, pid, NULL, NULL);

			sleep(1);
		}

		return 0;
	}

should crash the kernel.

If the task is traced by its natural parent ptrace_reparented() returns 0
but we should clear -&gt;btsxxx anyway.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Markus Metzger &lt;markus.t.metzger@intel.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>fork.c: fix NULL pointer dereference when nr_threads == threads-max</title>
<updated>2009-02-06T16:43:11Z</updated>
<author>
<name>Li Zefan</name>
</author>
<published>2009-02-06T08:17:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=04ec93fe9bc98e3bd8560f79f56fed66dfae40d5'/>
<id>urn:sha1:04ec93fe9bc98e3bd8560f79f56fed66dfae40d5</id>
<content type='text'>
I happened to forked lots of processes, and hit NULL pointer dereference.
It is because in copy_process() after checking max_threads, 0 is returned
but not -EAGAIN.

The bug is introduced by "CRED: Detach the credentials from task_struct"
(commit f1752eec6145c97163dbce62d17cf5d928e28a27).

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>signal: re-add dead task accumulation stats.</title>
<updated>2009-02-05T12:04:33Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2009-02-05T11:24:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=32bd671d6cbeda60dc73be77fa2b9037d9a9bfa0'/>
<id>urn:sha1:32bd671d6cbeda60dc73be77fa2b9037d9a9bfa0</id>
<content type='text'>
We're going to split the process wide cpu accounting into two parts:

 - clocks; which can take all the time they want since they run
           from user context.

 - timers; which need constant time tracing but can affort the overhead
           because they're default off -- and rare.

The clock readout will go back to a full sum of the thread group, for this
we need to re-add the exit stats that were removed in the initial itimer
rework (f06febc9: timers: fix itimer/many thread hang).

Furthermore, since that full sum can be rather slow for large thread groups
and we have the complete dead task stats, revert the do_notify_parent time
computation.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Reviewed-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-01-26T17:47:43Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2009-01-26T17:47:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1e70c7f7a9d4a3d2cc78b40e1d7768d99cd79899'/>
<id>urn:sha1:1e70c7f7a9d4a3d2cc78b40e1d7768d99cd79899</id>
<content type='text'>
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  hrtimers: fix inconsistent lock state on resume in hres_timers_resume
  time-sched.c: tick_nohz_update_jiffies should be static
  locking, hpet: annotate false positive warning
  kernel/fork.c: unused variable 'ret'
  itimers: remove the per-cpu-ish-ness
</content>
</entry>
</feed>
