kernel/exit: Fix a comment and code contradiction
PATCH 1/1 kernel/exit: Fix a comment and code contradiction
Hi list,
Comment in release_task() claims that group leader's parent process is signalled only if it desires so, which is not true.
---
To save your time, here's the contradictory code which don't appear in the patch (appears after its last line):
leader = p->group_leader;
if (leader != p && thread_group_empty(leader) && leader->exit_state = EXIT_ZOMBIE) {
BUG_ON(leader->exit_signal = -1);
do_notify_parent(leader, leader->exit_signal);kernel/exit.c +1 -1
@@ -152,7 +152,7 @@ repeat:/* * If we are the last non-leader member of the thread * group, and the leader is zombie, then notify the -* group leader's parent process. (if it wants notification.) +* group leader's parent process. */ zap_leader =0 ; leader = p->group_leader;
Signature · 7 lines
Ahmed S. Darwish http://darwish.07.googlepages.com _______________________________________________ Kernel-janitors mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
Hi,
Quoted 2 lines · Ahmed S. Darwish
Comment in
release_task()claims that group leader's parent process is signalled only if it desires so, which is not true.
AFAIS, `if it wants notification' means, it does not ignore its children via SIG_IGN als handler for SIGCHLD.
do_notify_parent() checks if the parent wants to get informed about the child states.
- Johannes
[Johannes please use replay-to-all to notify all readers]
Quoted 7 lines · On 2007-03-17 9:45:36 Johannes Weiner wrote:
Quoted 2 lines · Ahmed S. Darwish
Comment in
release_task()claims that group leader's parent process is signalled only if it desires so, which is not true.AFAIS, `if it wants notification' means, it does not ignore its children via
SIG_IGNals handler for SIGCHLD.
AFAIK, exit_signal = -1 means that the parent don't want to be signalled, like what happenes when using CLONE_THREAD.
But it's even signalled in that case (after issuing a BUG):
BUG_ON(leader->exit_signal = -1); do_notify_parent(leader, leader->exit_signal);
Quoted 3 lines
do_notify_parent()checks if the parent wants to get informed about the child states.
Yes it does the check but it notifies the given task_struct anyway:
BUG_ON(sig = -1); [ Continue parent notification normally ]
Signature · 7 lines
Ahmed S. Darwish http://darwish.07.googlepages.com _______________________________________________ Kernel-janitors mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors