mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
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()
This commit is contained in:
commit
2aedd192f7
1 changed files with 1 additions and 1 deletions
|
@ -4903,7 +4903,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
|
|||
int ret;
|
||||
cpumask_var_t mask;
|
||||
|
||||
if (len < nr_cpu_ids)
|
||||
if ((len * BITS_PER_BYTE) < nr_cpu_ids)
|
||||
return -EINVAL;
|
||||
if (len & (sizeof(unsigned long)-1))
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Reference in a new issue