diff options
| author | David Howells <[email protected]> | 2023-02-27 13:04:54 +0000 |
|---|---|---|
| committer | Steve French <[email protected]> | 2023-03-02 00:18:25 +0000 |
| commit | 4c0421fa6df136ff869a078594b4b7b7637e566a (patch) | |
| tree | c9bf0849cee10a480fad111f25726deb6a8e7655 /tools/perf/scripts/python/check-perf-trace.py | |
| parent | cifs: Fix cifs_write_back_from_locked_folio() (diff) | |
| download | kernel-4c0421fa6df136ff869a078594b4b7b7637e566a.tar.gz kernel-4c0421fa6df136ff869a078594b4b7b7637e566a.zip | |
iov: Fix netfs_extract_user_to_sg()
Fix the loop check in netfs_extract_user_to_sg() for extraction from
user-backed iterators to do the body if npages > 0, not if npages < 0
(which it can never be).
This isn't currently used by cifs, which only ever extracts data from BVEC,
KVEC and XARRAY iterators at this level, user-backed iterators having being
decanted into BVEC iterators at a higher level to accommodate the work
being done in a kernel thread.
Found by smatch:
fs/netfs/iterator.c:139 netfs_extract_user_to_sg() warn: unsigned 'npages' is never less than zero.
Fixes: 018584697533 ("netfs: Add a function to extract an iterator into a scatterlist")
Reported-by: kernel test robot <[email protected]>
Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Reported-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/Y/yYnAhoAYDBKixX@kili
Reviewed-by: Paulo Alcantara (SUSE) <[email protected]>
Signed-off-by: David Howells <[email protected]>
cc: Jeff Layton <[email protected]>
cc: [email protected]
cc: [email protected]
Signed-off-by: Steve French <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions
