diff options
author | Ming Lei <[email protected]> | 2019-07-01 15:14:46 +0800 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2019-07-01 08:18:54 -0600 |
commit | 79d08f89bb1b5c2c1ff90d9bb95497ab9e8aa7e0 (patch) | |
tree | 9394c85b2fa7022176c9bcfad49fa809dc6a15aa /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 5be1f9d82fa73c199ebeee2866dbac83e419c897 (diff) |
block: fix .bi_size overflow
'bio->bi_iter.bi_size' is 'unsigned int', which at most hold 4G - 1
bytes.
Before 07173c3ec276 ("block: enable multipage bvecs"), one bio can
include very limited pages, and usually at most 256, so the fs bio
size won't be bigger than 1M bytes most of times.
Since we support multi-page bvec, in theory one fs bio really can
be added > 1M pages, especially in case of hugepage, or big writeback
with too many dirty pages. Then there is chance in which .bi_size
is overflowed.
Fixes this issue by using bio_full() to check if the added segment may
overflow .bi_size.
Cc: Liu Yiding <[email protected]>
Cc: kernel test robot <[email protected]>
Cc: "Darrick J. Wong" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Fixes: 07173c3ec276 ("block: enable multipage bvecs")
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions