]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - kernel/sched.c
tg3: Remove function errors flagged by checkpatch
[net-next-2.6.git] / kernel / sched.c
index 528a10592c16782e813238e050fb1abba79e05e7..6af210a7de70d394015617863ee303059c9dd4d6 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>
@@ -4902,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;