Subject: Re: SMP problems in fork()?
To: Emmanuel Dreyfus <manu@netbsd.org>
From: Daniel Carosone <dan@geek.com.au>
List: tech-kern
Date: 12/09/2002 07:56:45
On Sun, Dec 08, 2002 at 09:42:58PM +0100, Emmanuel Dreyfus wrote:
> In fork1(), we set the child as runnable, and we use a pointer to its
> proc structure after this. 
> 
> On a SMP system, the child could be scheduled for running on another
> CPU, and it could even die before we get out of fork1(), thus making us
> using a stale pointer on its struct proc.
> 
> It seems to me that we need to cleanup the end of fork1(), but I'm not
> sure of what should be done.

I think biglock prevents this at the moment, but this will eventually
go away.

--
Dan.