> Somehow the patch I sent misses the change in ptrace.c, it can use the
Actually, my pedantic streak prefers that to be in a separate patch.
I think the ptrace_reparented cleanup is fine, it is purely cosmetic and
improves readability.
This is changing the test from list_empty(&child->ptrace_list)
to child->parent == child->real_parent. It should indeed be
impossible for those tests not to match. But, paranoia is its
own reward. I don't object to the change, but it should be
separate so bisect distinguishes it should it ever turn out to
matter in some way we are now overlooking. I'd even be a
little inclined towards:
if (child->real_parent == child->parent) {
BUG_ON(!list_empty(&child->ptrace_list));
return 0;
} else {
BUG_ON(list_empty(&child->ptrace_list));
return 1;
}
except of course you couldn't use that in the reparent_thread case.
Thanks,
Roland
--