diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 528a10592c16..eaf5c7375dfd 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -4902,7 +4902,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len, | |||
4902 | int ret; | 4902 | int ret; |
4903 | cpumask_var_t mask; | 4903 | cpumask_var_t mask; |
4904 | 4904 | ||
4905 | if (len < nr_cpu_ids) | 4905 | if ((len * BITS_PER_BYTE) < nr_cpu_ids) |
4906 | return -EINVAL; | 4906 | return -EINVAL; |
4907 | if (len & (sizeof(unsigned long)-1)) | 4907 | if (len & (sizeof(unsigned long)-1)) |
4908 | return -EINVAL; | 4908 | return -EINVAL; |