public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* compat_sys_sched_setaffinity()
@ 2004-03-18  9:05 Andrew Morton
  2004-03-18  9:17 ` compat_sys_sched_setaffinity() Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2004-03-18  9:05 UTC (permalink / raw)
  To: linux-arch


This is broken for NR_CPUS > 64, is it not?

asmlinkage long compat_sys_sched_setaffinity(compat_pid_t pid, 
					     unsigned int len,
					     compat_ulong_t *user_mask_ptr)
{
	unsigned long kernel_mask;
	mm_segment_t old_fs;
	int ret;

	if (get_user(kernel_mask, user_mask_ptr))
		return -EFAULT;

	old_fs = get_fs();
	set_fs(KERNEL_DS);
	ret = sys_sched_setaffinity(pid,
				    sizeof(kernel_mask),
				    &kernel_mask);
	set_fs(old_fs);

	return ret;
}

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-03-18 23:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-18  9:05 compat_sys_sched_setaffinity() Andrew Morton
2004-03-18  9:17 ` compat_sys_sched_setaffinity() Andrew Morton
2004-03-18  9:46   ` compat_sys_sched_setaffinity() Anton Blanchard
2004-03-18 23:08     ` compat_sys_sched_setaffinity() David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox