]> git.baikalelectronics.ru Git - kernel.git/commit
exit: wait: cleanup the ptrace_reparented() checks
authorOleg Nesterov <oleg@redhat.com>
Wed, 10 Dec 2014 23:54:45 +0000 (15:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:17 +0000 (17:41 -0800)
commit282a81f7e1336f7f0f316fac6880cf5ec7683bc5
treef664fee962fdd4521ec1b64143d8a0f21a32a7e0
parent9157ae80a4fd9f814e1903bddbdf0c5d083614f9
exit: wait: cleanup the ptrace_reparented() checks

Now that EXIT_DEAD is the terminal state we can kill "int traced"
variable and check "state == EXIT_DEAD" instead to cleanup the code.  In
particular, this way it is clear that the check obviously doesn't need
tasklist_lock.

Also fix the type of "unsigned long state", "long" was always wrong
although this doesn't matter because cmpxchg/xchg uses typeof(*ptr).

[akpm@linux-foundation.org: don't make me google the C Operator Precedence table]
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Aaron Tomlin <atomlin@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Sterling Alexander <stalexan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/exit.c