Skip to content
Commit 49b1f22b authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe
Browse files

block: avoid to READ fields of null bio



rq->bio can be NULL sometimes, such as flush request, so don't
read bio->bi_seg_front_size until this 'bio' is checked as valid.

Cc: Bart Van Assche <bvanassche@acm.org>
Reported-by: default avatarBart Van Assche <bvanassche@acm.org>
Fixes: dcebd755

 ("block: use bio_for_each_bvec() to compute multi-page bvec count")
Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 6fb845f0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment