Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wait_task_stopped/continued: remove unneeded p->signal != NULL check

The child was found on ->children list under tasklist_lock, it must have a
valid ->signal. __exit_signal() both removes the task from parent->children
and clears ->signal "atomically" under write_lock(tasklist).

Remove unneeded checks.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Oleg Nesterov and committed by
Linus Torvalds
715015e8 18442cf2

+1 -4
+1 -4
kernel/exit.c
··· 1322 1322 if (!p->exit_code) 1323 1323 return 0; 1324 1324 if (delayed_group_leader && !(p->ptrace & PT_PTRACED) && 1325 - p->signal && p->signal->group_stop_count > 0) 1325 + p->signal->group_stop_count > 0) 1326 1326 /* 1327 1327 * A group stop is in progress and this is the group leader. 1328 1328 * We won't report until all threads have stopped. ··· 1435 1435 int retval; 1436 1436 pid_t pid; 1437 1437 uid_t uid; 1438 - 1439 - if (unlikely(!p->signal)) 1440 - return 0; 1441 1438 1442 1439 if (!(p->signal->flags & SIGNAL_STOP_CONTINUED)) 1443 1440 return 0;