/* sys_sched_setaffinity - set the cpu affinity of a process @pid: pid of the process @len: length in bytes of the bitmask pointed to by user_mask_ptr @user_mask_ptr: user-space pointer to the new cpu mask  */
SYSCALL_DEFINE3(sched_setaffinity, pid_t, pid, unsigned int, len, unsigned long __user *, user_mask_ptr)
/* sys_sched_setaffinity - set the cpu affinity of a process @pid: pid of the process @len: length in bytes of the bitmask pointed to by user_mask_ptr @user_mask_ptr: user-space pointer to the new cpu mask  */
SYSCALL_DEFINE3(sched_setaffinity, pid_t, pid, unsigned int, len, unsigned long __user *, user_mask_ptr)
{
	cpumask_var_t new_mask;
	int retval;
	if (!alloc_cpumask_var(&new_mask, GFP_KERNEL))
		return -ENOMEM;
	retval = get_user_cpu_mask(user_mask_ptr, len, new_mask);
	if (retval == 0)
		retval = sched_setaffinity(pid, new_mask);
	free_cpumask_var(new_mask);
	return retval;
}