Re: [PATCH rc1-mm] simplify exec from init's subthread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oleg Nesterov <[email protected]> writes:

> [ On top of "exec: allow init to exec from any thread.",
>   filename exec-allow-init-to-exec-from-any-thread.patch ]
>
> I think it is enough to take tasklist_lock for reading while
> changing child_reaper:
>
> 	Reparenting needs write_lock(tasklist_lock)
>
> 	Only one thread in a thread group can do exec()
>
> 	sighand->siglock garantees that get_signal_to_deliver()
> 	will not see a stale value of child_reaper.
>
> This means that we can change child_reaper earlier, without
> calling zap_other_threads() twice.
>
> "child_reaper = current" is a NOOP when init does exec from
> main thread, we don't care.

Looks good.  I fat fingered my locking anyway, and this
looks like a good fix, as well as the more obvious place,
to do this.

Acked-by:  Eric Biederman <[email protected]>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux