From: Tejun Heo Date: Thu, 2 Jun 2011 09:13:59 +0000 (+0200) Subject: ptrace: relocate set_current_state(TASK_TRACED) in ptrace_stop() X-Git-Tag: v3.1-rc1~308^2~35 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81be24b8cdeb69e62f9d1b6b425fd9ffdd37f581;p=pandora-kernel.git ptrace: relocate set_current_state(TASK_TRACED) in ptrace_stop() In ptrace_stop(), after arch hook is done, the task state and jobctl bits are updated while holding siglock. The ordering requirement there is that TASK_TRACED is set before JOBCTL_TRAPPING is cleared to prevent ptracer waiting on TRAPPING doesn't end up waking up TRACED is actually set and sees TASK_RUNNING in wait(2). Move set_current_state(TASK_TRACED) to the top of the block and reorganize comments. This makes the ordering more obvious (TASK_TRACED before other updates) and helps future updates to group stop participation. This patch doesn't cause any functional change. Signed-off-by: Tejun Heo Signed-off-by: Oleg Nesterov --- Reading git-diff-tree failed