Re: [PATCH 3/3] pids: Make it possible to clone tasks with givenpids

From: Tejun Heo
Date: Thu Nov 10 2011 - 12:30:23 EST


Hello, Pavel.

> for (i = ns->level; i >= 0; i--) {
> - nr = alloc_pidmap(tmp);
> + nr = 0;
> + if (unlikely(want_pids != NULL)) {
> + if (get_user(nr, want_pids)) {
> + nr = -EFAULT;
> + goto out_free;
> + }
> +
> + if (nr != 0) {
> + want_pids++;
> + nr = set_pidmap(tmp, nr);
> + } else
> + want_pids = NULL; /* optimize above */
> + }
> + if (nr == 0)
> + nr = alloc_pidmap(tmp);

Hmmm... is it necessary to be able to replicate pids on all
namespaces? Also, isn't it a bit weird to be able to request PIDs in
the namespaces which is beyond the task which requested cloning?

Thanks.

--
tejun
--
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/