From: Peter Zijlstra Date: Mon, 28 Jun 2010 14:51:01 +0000 (+0200) Subject: init, sched: Fix race between init and kthreadd X-Git-Tag: v2.6.35-rc4~8^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b433c3d4549ae74935b585115f076c6fb7bc48fe;p=pandora-kernel.git init, sched: Fix race between init and kthreadd Ilya reported that on a very slow machine he could reliably reproduce a race between forking init and kthreadd. We first fork init so that it obtains pid-1, however since the scheduler is already fully running at this point it can preempt and run the init thread before we spawn and set kthreadd_task. The init thread can then attempt spawning kthreads without kthreadd being present which results in an OOPS. Reported-by: Ilya Loginov Signed-off-by: Peter Zijlstra Acked-by: Linus Torvalds LKML-Reference: <1277736661.3561.110.camel@laptop> Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed