From: David Howells <dhowells@redhat.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: David Howells <dhowells@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: thread groups bug?
Date: Thu, 28 Feb 2002 21:57:55 +0000 [thread overview]
Message-ID: <15283.1014933475@warthog.cambridge.redhat.com> (raw)
In-Reply-To: Message from Linus Torvalds <torvalds@transmeta.com> of "Thu, 28 Feb 2002 09:16:47 PST." <Pine.LNX.4.33.0202280914500.15607-100000@home.transmeta.com>
> When they have the same TGID, they _are_ the same thread group.
Apparently not so... Doing an execve() on the master thread breaks this
internally by removing the master thread from the thread-group ring without
resetting the TGID on all subsidiary threads. So if one of the subsidiary
threads thinks its TGID is x before an execve on the master, then if it tries
to use that TGID after the execve on the master, it will affect the master's
new thread group and not itself.
> There is absolutely _zero_ correlation between thread ID and MM. Never has
> been, never will be. An execve() is a total non-event from a TGID
> perspective.
Except that the execve() _can_ (a) change the TGID and (b) result in two
effective thread groups of the same TGID as far as the kernel is concerned.
> If you expect POSIX behaviour, you do not do execve's from the master.
> It's that simple.
My concern is not so much dealing with POSIX behaviour as coping with
behaviour that can happen without getting snookered.
David
next prev parent reply other threads:[~2002-02-28 22:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-28 15:09 thread groups bug? David Howells
2002-02-28 17:16 ` Linus Torvalds
2002-02-28 21:57 ` David Howells [this message]
2002-03-01 0:20 ` Linus Torvalds
2002-03-01 16:24 ` Dave McCracken
2002-03-01 16:38 ` David Howells
2002-03-01 17:01 ` Martin Dalecki
2002-03-01 17:05 ` Dave McCracken
-- strict thread matches above, loose matches on Subject: below --
2002-02-28 14:52 David Howells
2002-02-28 15:18 ` Benjamin LaHaise
2002-02-28 15:36 ` David Howells
2002-02-28 15:59 ` Benjamin LaHaise
2002-02-28 16:28 ` David Howells
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=15283.1014933475@warthog.cambridge.redhat.com \
--to=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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