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, Dave Hansen <haveblue@us.ibm.com>,
Herbert Poetzl <herbert@13thfloor.at>,
"Paul E. McKenney" <paulmck@us.ibm.com>
Subject: Re: [PATCH] pidhash: Kill switch_exec_pids
Date: Fri, 03 Feb 2006 05:59:40 -0700 [thread overview]
Message-ID: <m1psm4pphf.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <43E35A13.B83AC4B8@tv-sign.ru> (Oleg Nesterov's message of "Fri, 03 Feb 2006 16:26:43 +0300")
Oleg Nesterov <oleg@tv-sign.ru> writes:
> "Eric W. Biederman" wrote:
>>
>>
>> All I have done is enlarged the window where this
>> race is possible. So for tkill I am not concerned,
>> as it wants a particular thread. Nor am I concerned
>> about anything else that wants a particular thread.
>
> Yes, you are right, sorry for noise. We have exactly same situation
> before de_thread() locks tasklist after killing the leader.
No problem. If de_thread was simple and obviously correct
we wouldn't be fixing it :)
>> The fact that the group_leader does not point
>> at the actual thread group leader might be a problem,
>> as I have opened a window where that is now the case.
>>
>> For signals that is not a problem as signals are still shared.
>> This applies to most other resources as well.
>
> Actually, now I think this patch fixes a small theoretical bug.
> Currently we have a tiny window in switch_exec_pids() when it
> detaches ->pid from PIDTYPE_PID namespace. RCU based kill_proc_info()
> does not take tasklist, so we can miss a signal.
Ok. I thought there was a RCU component to the readers. I just
lost track of where it was.
> I have added Paul to the CC: list.
>
>> So until we spot that case I'm ready to put this down
>> of one of those cases in de_thread that looks wrong
>> but happens to work. Now if there is a way to make
>> it work more cleanly that may be worth looking at.
>
> I think you are right.
I hope so.
> Andrew, please drop this one:
>
> dont-touch-current-tasks-in-de_thread.patch
>
> Eric's patch includes this cleanup.
I just tested this path against 2.6.16-rc1-mm5
and the patch applies with just a little fuzz.
Eric
next prev parent reply other threads:[~2006-02-03 13:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-02 17:45 Eric W. Biederman
2006-02-02 20:25 ` Oleg Nesterov
2006-02-02 20:08 ` Eric W. Biederman
2006-02-03 13:26 ` Oleg Nesterov
2006-02-03 12:59 ` Eric W. Biederman [this message]
2006-02-02 21:45 ` Andrew Morton
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=m1psm4pphf.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@osdl.org \
--cc=haveblue@us.ibm.com \
--cc=herbert@13thfloor.at \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
--cc=paulmck@us.ibm.com \
/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
Powered by JetHome