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 8cafe3ff558f..b0bbadc24955 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -4860,7 +4860,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len, | |||
4860 | int ret; | 4860 | int ret; |
4861 | cpumask_var_t mask; | 4861 | cpumask_var_t mask; |
4862 | 4862 | ||
4863 | if (len < nr_cpu_ids) | 4863 | if ((len * BITS_PER_BYTE) < nr_cpu_ids) |
4864 | return -EINVAL; | 4864 | return -EINVAL; |
4865 | if (len & (sizeof(unsigned long)-1)) | 4865 | if (len & (sizeof(unsigned long)-1)) |
4866 | return -EINVAL; | 4866 | return -EINVAL; |