From: ebiederm@xmission.com (Eric W. Biederman)
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] exec: Cleanup exec from a non thread group leader.
Date: Tue, 31 Jan 2006 08:35:28 -0700 [thread overview]
Message-ID: <m1hd7k4dhb.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <43DF36EF.C38E6C4B@tv-sign.ru> (Oleg Nesterov's message of "Tue, 31 Jan 2006 13:07:43 +0300")
Oleg Nesterov <oleg@tv-sign.ru> writes:
> We can't just remove this list_del, note __ptrace_link() above.
> So if we remove list_add from switch_exec_pids() (like you did
> in your patch) we should also place list_add before ptrace_link()
> in de_thread(), otherwise I beleive it is a bug.
Ok. I see it now. The REMOVE_LINKS/SET_LINKS deep in __ptrace_link()
touching the task list is sneaky.
> I agree, we should cleanup this. I just noticed that I forgot
> to add you on CC: list while sending this patch:
>
> http://marc.theaimsgroup.com/?l=linux-kernel&m=113862839924746
>
> Btw, I don't understand why __ptrace_link() use REMOVE_LINKS/SET_LINKS
> instead of remove_parent/add_parent.
I see one of two possibilities.
- Either there is a magic invariant that is supposed to be preserved
about always being on the task list with a parent.
(And the code in this part of exec is already broken).
- Or the code is just being inefficient.
A corollary is why is any of this code safe to run without holding
the tasklist_lock?
Eric
next prev parent reply other threads:[~2006-01-31 15:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-30 11:52 [PATCH] exec: Cleanup exec from a non thread group leader Oleg Nesterov
2006-01-30 14:48 ` Oleg Nesterov
2006-01-30 20:33 ` Eric W. Biederman
2006-01-31 10:07 ` Oleg Nesterov
2006-01-31 15:35 ` Eric W. Biederman [this message]
2006-01-30 20:27 ` Eric W. Biederman
-- strict thread matches above, loose matches on Subject: below --
2006-01-29 6:23 Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1hd7k4dhb.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox