From: Rusty Russell <rusty@rustcorp.com.au>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: [PATCH] fix do_fork() return value
Date: Tue, 20 May 2003 12:46:44 +1000 [thread overview]
Message-ID: <20030520024801.535E02C002@lists.samba.org> (raw)
# Noticed by Julie DeWandel <jdewand@redhat.com>.
#
# do_fork() needs to return the pid (or error), not the pointer to the
# resulting process structure. The process structure may not even be
# valid any more, since do_fork() has already woken the process up (and as
# a result it might already have done its thing and gone away).
#
# Besides, doing it this way cleans up the users, which all really just
# wanted the pid or error number _anyway_.
Just FYI: the change was done in the first place to allow spawning a
new init thread as CPUs come up. But now we have copy_process it can
be done neatly (it should also be done out of keventd so we get a
clean thread, but that's another story).
Note that this version also has a (theoretical) race, except hidden
by the time to wrap PIDs ie. "never happens".
Thanks!
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
next reply other threads:[~2003-05-20 2:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-20 2:46 Rusty Russell [this message]
2003-05-25 17:31 ` Pavel Machek
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=20030520024801.535E02C002@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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
all inboxes | Powered by JetHome®