From: Salman Qazi Date: Tue, 26 Jun 2012 01:18:15 +0000 (-0700) Subject: sched: Fix fork() error path to not crash X-Git-Tag: v3.5-rc7~7^4~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=164c33c6adee609b8b9062cce4c10f764d0dce13;p=pandora-kernel.git sched: Fix fork() error path to not crash In dup_task_struct(), if arch_dup_task_struct() fails, the clean up code fails to clean up correctly. That's because the clean up code depends on unininitalized ti->task pointer. We fix this by making sure that the task and thread_info know about each other before we attempt to take the error path. Signed-off-by: Salman Qazi Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/r/20120626011815.11323.5533.stgit@dungbeetle.mtv.corp.google.com Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed