diff options
author | Stefano Garzarella <[email protected]> | 2023-09-25 12:30:57 +0200 |
---|---|---|
committer | David S. Miller <[email protected]> | 2023-10-04 08:26:48 +0100 |
commit | 7aed44babc7f97e82b38e9a68515e699692cc100 (patch) | |
tree | e527c0c689861df102dd83a329120e48500ac374 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | a0c55bba0d0d0b5591083f65f830940d8ae63f31 (diff) |
vringh: don't use vringh_kiov_advance() in vringh_iov_xfer()
In the while loop of vringh_iov_xfer(), `partlen` could be 0 if one of
the `iov` has 0 lenght.
In this case, we should skip the iov and go to the next one.
But calling vringh_kiov_advance() with 0 lenght does not cause the
advancement, since it returns immediately if asked to advance by 0 bytes.
Let's restore the code that was there before commit b8c06ad4d67d
("vringh: implement vringh_kiov_advance()"), avoiding using
vringh_kiov_advance().
Fixes: b8c06ad4d67d ("vringh: implement vringh_kiov_advance()")
Cc: [email protected]
Reported-by: Jason Wang <[email protected]>
Signed-off-by: Stefano Garzarella <[email protected]>
Acked-by: Jason Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions