>
> On Tue, 27 May 2008, Oleg Nesterov wrote:
>
> > In theory find_pid() is not safe without rcu_read_lock() if CONFIG_PREEMPT_RCU.
> > But we have a lot of "read_lock(tasklist_lock) + find_pid()", this was legal
> > and documented. It was actually broken, but happened to work because read_lock()
> > implied rcu_read_lock().
> >
> > Could you look at
> >
> > [PATCH] fix tasklist + find_pid() with CONFIG_PREEMPT_RCU
> >
http://marc.info/?t=120162615300012
> >
> > ?
> >
> > I am not sure this is the actual reason though, the race is very unlikely.
>
> That is a *very* unlikely race, especially as that bad_fork_free_pid case
> would only happen if pid_ns_prepare_proc() fails.