[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080305041858.8FBD927010A@magilla.localdomain>
Date: Tue, 4 Mar 2008 20:18:58 -0800 (PST)
From: Roland McGrath <roland@...hat.com>
To: Oleg Nesterov <oleg@...sign.ru>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] introduce ptrace_reparented() helper
> Somehow the patch I sent misses the change in ptrace.c, it can use the
> new helper too.
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.
> - if (!list_empty(&child->ptrace_list)) {
> + if (ptrace_reparented(child)) {
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists