diff options
author | Christian A. Ehrhardt <[email protected]> | 2024-01-21 21:26:34 +0100 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2024-01-23 08:56:55 -0700 |
commit | 13f3956eb5681a4045a8dfdef48df5dc4d9f58a6 (patch) | |
tree | ee56f24ab7e011a8aa4361654a8e616caa265061 /tools/perf/scripts/python | |
parent | 7777f47f2ea64efd1016262e7b59fab34adfb869 (diff) |
block: Fix WARNING in _copy_from_iter
Syzkaller reports a warning in _copy_from_iter because an
iov_iter is supposedly used in the wrong direction. The reason
is that syzcaller managed to generate a request with
a transfer direction of SG_DXFER_TO_FROM_DEV. This instructs
the kernel to copy user buffers into the kernel, read into
the copied buffers and then copy the data back to user space.
Thus the iovec is used in both directions.
Detect this situation in the block layer and construct a new
iterator with the correct direction for the copy-in.
Reported-by: [email protected]
Closes: https://lore.kernel.org/lkml/[email protected]/t/
Reported-by: [email protected]
Closes: https://lore.kernel.org/lkml/[email protected]/T/
Signed-off-by: Christian A. Ehrhardt <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions