aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-04-08 11:37:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-08 11:37:05 -0400
commit2aedd192f799c362ccefc3c316f0c4bd5154126b (patch)
tree080ead7bd2c4ae496ef82e9633eadc1d1af28946 /kernel/sched.c
parentcf90bfe2ebaf9d32f37acbebb7425c280fd6cd30 (diff)
parent84fba5ec91f11c0efb27d0ed6098f7447491f0df (diff)
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Fix sched_getaffinity()
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index a3dff1f3f9b0..6af210a7de70 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4903,7 +4903,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
4903 int ret; 4903 int ret;
4904 cpumask_var_t mask; 4904 cpumask_var_t mask;
4905 4905
4906 if (len < nr_cpu_ids) 4906 if ((len * BITS_PER_BYTE) < nr_cpu_ids)
4907 return -EINVAL; 4907 return -EINVAL;
4908 if (len & (sizeof(unsigned long)-1)) 4908 if (len & (sizeof(unsigned long)-1))
4909 return -EINVAL; 4909 return -EINVAL;