Revision 6bedf00e55e5dd0a4ed1ad3f06131edd6fb56ec8 authored by Ming Lei on 17 April 2019, 01:11:26 UTC, committed by Jens Axboe on 19 April 2019, 17:32:14 UTC
bvec->bv_offset may be bigger than PAGE_SIZE sometimes, such as, when one bio is splitted in the middle of one bvec via bio_split(), and bi_iter.bi_bvec_done is used to build offset of the 1st bvec of remained bio. And the remained bio's bvec may be re-submitted to fs layer via ITER_IBVEC, such as loop and nvme-loop. So we have to make sure that every bvec's offset is less than PAGE_SIZE from bio_for_each_segment_all() because some drivers(loop, nvme-loop) passes the splitted bvec to fs layer via ITER_BVEC. This patch fixes this issue reported by Zhang Yi When running nvme/011. Cc: Christoph Hellwig <hch@lst.de> Cc: Yi Zhang <yi.zhang@redhat.com> Reported-by: Yi Zhang <yi.zhang@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Fixes: 6dc4f100c175 ("block: allow bio_for_each_segment_all() to iterate over multi-page bvec") Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent b40fabc
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 65.1 KB |
Makefile | -rw-r--r-- | 1.2 KB |
calibrate.c | -rw-r--r-- | 8.6 KB |
do_mounts.c | -rw-r--r-- | 15.1 KB |
do_mounts.h | -rw-r--r-- | 1.1 KB |
do_mounts_initrd.c | -rw-r--r-- | 3.5 KB |
do_mounts_md.c | -rw-r--r-- | 7.9 KB |
do_mounts_rd.c | -rw-r--r-- | 8.1 KB |
init_task.c | -rw-r--r-- | 5.2 KB |
initramfs.c | -rw-r--r-- | 13.7 KB |
main.c | -rw-r--r-- | 28.9 KB |
noinitramfs.c | -rw-r--r-- | 1.5 KB |
version.c | -rw-r--r-- | 1.2 KB |
Computing file changes ...