diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-08 10:02:02 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-08 10:02:02 -0700 |
commit | d620a7cf05d4f12f5bbb1060d766e8139ab31458 (patch) | |
tree | 96123ef42b2c78b3c43fd46ea365e544353c6489 | |
parent | 2aedd192f799c362ccefc3c316f0c4bd5154126b (diff) | |
parent | 45c4d015a92f72ec47acd0c7557abdc0c8a6499d (diff) | |
download | linux-d620a7cf05d4f12f5bbb1060d766e8139ab31458.tar.bz2 |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* '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)
-rw-r--r-- | include/linux/ata.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index b4c85e2adef5..700c5b9b3583 100644 --- a/include/linux/ata.h +++ b/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) |