diff options
author | Ming Lei <ming.lei@redhat.com> | 2017-12-18 10:40:43 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-12-18 23:55:43 +0300 |
commit | 14cb0dc6479dc5ebc63b3a459a5d89a2f1b39fed (patch) | |
tree | db336ec3ba6267370615b5bc60c104f03f924bef /include/linux/c2port.h | |
parent | a9fa99146ab4fc029ba5551a1a3a0102fae7fddf (diff) | |
download | linux-14cb0dc6479dc5ebc63b3a459a5d89a2f1b39fed.tar.xz |
block: don't let passthrough IO go into .make_request_fn()
Commit a8821f3f3("block: Improvements to bounce-buffer handling") tries
to make sure that the bio to .make_request_fn won't exceed BIO_MAX_PAGES,
but ignores that passthrough I/O can use blk_queue_bounce() too.
Especially, passthrough IO may not be sector-aligned, and the check
of 'sectors < bio_sectors(*bio_orig)' inside __blk_queue_bounce() may
become true even though the max bvec number doesn't exceed BIO_MAX_PAGES,
then cause the bio splitted, and the original passthrough bio is submited
to generic_make_request().
This patch fixes this issue by checking if the bio is passthrough IO,
and use bio_kmalloc() to allocate the cloned passthrough bio.
Cc: NeilBrown <neilb@suse.com>
Fixes: a8821f3f3("block: Improvements to bounce-buffer handling")
Tested-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/c2port.h')
0 files changed, 0 insertions, 0 deletions