diff --git a/[refs] b/[refs] index 4cdff08e9abc..a28bc8c1a570 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2aedd192f799c362ccefc3c316f0c4bd5154126b +refs/heads/master: 45c4d015a92f72ec47acd0c7557abdc0c8a6499d diff --git a/trunk/include/linux/ata.h b/trunk/include/linux/ata.h index b4c85e2adef5..700c5b9b3583 100644 --- a/trunk/include/linux/ata.h +++ b/trunk/include/linux/ata.h @@ -1025,8 +1025,8 @@ static inline int ata_ok(u8 status) static inline int lba_28_ok(u64 block, u32 n_block) { - /* check the ending block number */ - return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256); + /* check the ending block number: must be LESS THAN 0x0fffffff */ + return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256); } static inline int lba_48_ok(u64 block, u32 n_block) diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index 6af210a7de70..a3dff1f3f9b0 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -4903,7 +4903,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len, int ret; cpumask_var_t mask; - if ((len * BITS_PER_BYTE) < nr_cpu_ids) + if (len < nr_cpu_ids) return -EINVAL; if (len & (sizeof(unsigned long)-1)) return -EINVAL;