[Devel] Re: [PATCH 7/7] [PATCH] Define clone_with_pids syscall

Sukadev Bhattiprolu sukadev at linux.vnet.ibm.com
Wed May 27 19:58:29 PDT 2009


| > +	if (copy_from_user(&pid_set, upid_setp, sizeof(pid_set)))
| > +		return ERR_PTR(-EFAULT);
| > +
| > +	size = pid_set.num_pids * sizeof(pid_t);
| 
| ...either test "pid_set.num_pids > 0" (and give -EINVAL),
| or...

Good point. I now check for num_pids > 0 and treat num_pids == 0 as
normal clone().

While addressing this I realized I had a lot of arch-independent code
in arch/x86/kernel/process_32.c. I have now moved this common code to
kernel/fork.c. Its non-trivial code move, so need new review/acks from
you and Serge for at least patches 6 and 7.

Sukadev
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list