diff options
Diffstat (limited to 'kernel/sched.c')
| -rw-r--r-- | kernel/sched.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 49d2fa7b687a..6af210a7de70 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> |
| @@ -4902,7 +4903,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len, | |||
| 4902 | int ret; | 4903 | int ret; |
| 4903 | cpumask_var_t mask; | 4904 | cpumask_var_t mask; |
| 4904 | 4905 | ||
| 4905 | if (len < nr_cpu_ids) | 4906 | if ((len * BITS_PER_BYTE) < nr_cpu_ids) |
| 4906 | return -EINVAL; | 4907 | return -EINVAL; |
| 4907 | if (len & (sizeof(unsigned long)-1)) | 4908 | if (len & (sizeof(unsigned long)-1)) |
| 4908 | return -EINVAL; | 4909 | return -EINVAL; |
| @@ -5387,7 +5388,7 @@ int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask) | |||
| 5387 | 5388 | ||
| 5388 | get_task_struct(mt); | 5389 | get_task_struct(mt); |
| 5389 | task_rq_unlock(rq, &flags); | 5390 | task_rq_unlock(rq, &flags); |
| 5390 | wake_up_process(rq->migration_thread); | 5391 | wake_up_process(mt); |
| 5391 | put_task_struct(mt); | 5392 | put_task_struct(mt); |
| 5392 | wait_for_completion(&req.done); | 5393 | wait_for_completion(&req.done); |
| 5393 | tlb_migrate_finish(p->mm); | 5394 | tlb_migrate_finish(p->mm); |
