Eric W. Biederman [[email protected]] 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. -- To unsubscribe from this list: send the line "unsubscribe linux-api" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
