Re: [PATCH v2 2/2] exit: pidns: fix/update the comments in zap_pid_ns_processes()
From: Oleg Nesterov
Date: Mon Dec 01 2014 - 18:25:07 EST
On 12/01, Andrew Morton wrote:
> On Thu, 27 Nov 2014 00:54:37 +0100 Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> > The comments in zap_pid_ns_processes() are not clear, we need to
> > explain how this code actually works.
> Could we please get some documentation for PIDNS_HASH_ADDING? What it
> does, what is the protocol for handling it, etc? I was trying to
> review your [1/2] but this little mystery has me somewhat stumped.
OK, I'll send another simple doc patch.
But in short it is simple. "nr_hashed & PIDNS_HASH_ADDING" just means
that this pid_ns is alive, and alloc_pid() can succeed. We need this to
ensure that a new child can't be injected after zap_pid_ns_processes()
has already killed all tasks in its pid_ns.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/