]> Pileus Git - ~andy/linux/blobdiff - kernel/sched.c
Merge branch 'slabh' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc
[~andy/linux] / kernel / sched.c
index 82975b5b42f71441eb148e3eeaac4c29a5316e4c..a3dff1f3f9b0c32070d3ade21f3d2da63708d099 100644 (file)
@@ -71,6 +71,7 @@
 #include <linux/debugfs.h>
 #include <linux/ctype.h>
 #include <linux/ftrace.h>
+#include <linux/slab.h>
 
 #include <asm/tlb.h>
 #include <asm/irq_regs.h>
@@ -4912,7 +4913,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
 
        ret = sched_getaffinity(pid, mask);
        if (ret == 0) {
-               int retlen = min(len, cpumask_size());
+               size_t retlen = min_t(size_t, len, cpumask_size());
 
                if (copy_to_user(user_mask_ptr, mask, retlen))
                        ret = -EFAULT;
@@ -5387,7 +5388,7 @@ int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask)
 
                get_task_struct(mt);
                task_rq_unlock(rq, &flags);
-               wake_up_process(rq->migration_thread);
+               wake_up_process(mt);
                put_task_struct(mt);
                wait_for_completion(&req.done);
                tlb_migrate_finish(p->mm);