diff options
| author | David Howells <[email protected]> | 2023-09-08 16:03:20 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2023-09-09 22:11:49 +0000 |
| commit | f741bd7178c95abd7aeac5a9d933ee542f9a5509 (patch) | |
| tree | 2daa2aee81598fcf690d39ac2424ef90173c00b9 /tools/perf/scripts/python | |
| parent | Merge tag 'sh-for-v6.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
| download | kernel-f741bd7178c95abd7aeac5a9d933ee542f9a5509.tar.gz kernel-f741bd7178c95abd7aeac5a9d933ee542f9a5509.zip | |
iov_iter: Fix iov_iter_extract_pages() with zero-sized entries
iov_iter_extract_pages() doesn't correctly handle skipping over initial
zero-length entries in ITER_KVEC and ITER_BVEC-type iterators.
The problem is that it accidentally reduces maxsize to 0 when it
skipping and thus runs to the end of the array and returns 0.
Fix this by sticking the calculated size-to-copy in a new variable
rather than back in maxsize.
Fixes: 7d58fe731028 ("iov_iter: Add a function to extract a page list from an iterator")
Signed-off-by: David Howells <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Al Viro <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: John Hubbard <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
