Re: [RFC][v8][PATCH 0/10] Implement clone3() system call
From: Sukadev Bhattiprolu
Date: Fri Oct 23 2009 - 23:37:31 EST
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.
--
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/