aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 4a57e96dd6c7..ab562ae4007c 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -71,6 +71,7 @@
71#include <linux/debugfs.h> 71#include <linux/debugfs.h>
72#include <linux/ctype.h> 72#include <linux/ctype.h>
73#include <linux/ftrace.h> 73#include <linux/ftrace.h>
74#include <linux/slab.h>
74 75
75#include <asm/tlb.h> 76#include <asm/tlb.h>
76#include <asm/irq_regs.h> 77#include <asm/irq_regs.h>
@@ -4809,7 +4810,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
4809 int ret; 4810 int ret;
4810 cpumask_var_t mask; 4811 cpumask_var_t mask;
4811 4812
4812 if (len < nr_cpu_ids) 4813 if ((len * BITS_PER_BYTE) < nr_cpu_ids)
4813 return -EINVAL; 4814 return -EINVAL;
4814 if (len & (sizeof(unsigned long)-1)) 4815 if (len & (sizeof(unsigned long)-1))
4815 return -EINVAL; 4816 return -EINVAL;
@@ -5305,7 +5306,7 @@ again:
5305 5306
5306 get_task_struct(mt); 5307 get_task_struct(mt);
5307 task_rq_unlock(rq, &flags); 5308 task_rq_unlock(rq, &flags);
5308 wake_up_process(rq->migration_thread); 5309 wake_up_process(mt);
5309 put_task_struct(mt); 5310 put_task_struct(mt);
5310 wait_for_completion(&req.done); 5311 wait_for_completion(&req.done);
5311 tlb_migrate_finish(p->mm); 5312 tlb_migrate_finish(p->mm);