]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 8 Apr 2010 17:02:02 +0000 (10:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 8 Apr 2010 17:02:02 +0000 (10:02 -0700)
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: Fix accesses at LBA28 boundary (old bug, but nasty) (v2)

kernel/sched.c

index a3dff1f3f9b0c32070d3ade21f3d2da63708d099..6af210a7de70d394015617863ee303059c9dd4d6 100644 (file)
@@ -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;