diff options
author | Kazuhisa Ichikawa <ki@epsilou.com> | 2009-05-12 13:27:45 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-12 13:27:45 +0200 |
commit | af498d7fa3e786f52650819a56e117ed9a40920c (patch) | |
tree | 4170275db90f306935e35be1c2cd2cbd6a1a27a8 /mm/sparse.c | |
parent | a4d7749be5de4a7261bcbe3c7d96c748792ec455 (diff) | |
download | linux-af498d7fa3e786f52650819a56e117ed9a40920c.tar.gz linux-af498d7fa3e786f52650819a56e117ed9a40920c.tar.bz2 linux-af498d7fa3e786f52650819a56e117ed9a40920c.zip |
block: fix the bio_vec array index out-of-bounds test
Current bio_vec array index out-of-bounds test within
__end_that_request_first() does not seem correct.
It checks bio->bi_idx against bio->bi_vcnt, but the subsequent code
uses idx (which is, bio->bi_idx + next_idx) as the array index into
bio_vec array. This means that the test really make sense only at
the first iteration of !(nr_bytes >=bio->bi_size) case (when next_idx
== zero). Fix this by replacing bio->bi_idx with idx.
(This patch applies to 2.6.30-rc4.)
Signed-off-by: Kazuhisa Ichikawa <ki@epsilou.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'mm/sparse.c')
0 files changed, 0 insertions, 0 deletions