Eric W. Biederman [ebiederm@xxxxxxxxxxxx] wrote: | > +static int set_pidmap(struct pid_namespace *pid_ns, int target) | > +{ | > + if (!target) | > + return alloc_pidmap(pid_ns); BTW, we need this now that the RESERVED_PIDS check is is conditional on ->last_pid. But this makes set_pidmap() completely general so should we have alloc_pid() call set_pidmap() always ? Or we could move this check into alloc_pid(), but it may be better to have all values of 'target' checked in one place. | > + | > + if (target >= pid_max) | > + return -EINVAL; | > + | > + if ((target < 0) || (target < RESERVED_PIDS && pid_ns == &init_pid_ns)) | > + return -EINVAL; | | if ((target < 0) || ((target < RESERVED_PIDS) && (pid_ns->last_pid >= RESERVED_PIDS))) | | Please. Ok. _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers