diff options
author | Ming Lei <ming.lei@redhat.com> | 2019-02-19 11:08:19 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-02-19 09:19:06 -0700 |
commit | 49b1f22b567ba1d7d8174950be4398a69d0effb7 (patch) | |
tree | 52811398366d5cc858edaebe17ca7cb1238a9777 /drivers/nvme | |
parent | 6fb845f0e78de19eaaf6a2d351702474e44b6a9e (diff) | |
download | lwn-49b1f22b567ba1d7d8174950be4398a69d0effb7.tar.gz lwn-49b1f22b567ba1d7d8174950be4398a69d0effb7.zip |
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: Bart Van Assche <bvanassche@acm.org>
Fixes: dcebd755926b0f39dd1e ("block: use bio_for_each_bvec() to compute multi-page bvec count")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme')
0 files changed, 0 insertions, 0 deletions