diff options
author | Geliang Tang <[email protected]> | 2024-05-23 14:50:03 +0800 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2024-06-03 19:32:55 +0200 |
commit | de1b5ea789dc28066cc8dc634b6825bd6148f38b (patch) | |
tree | 8f9bb70b0f3def3a5da1c521521e09af9322bf64 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c | |
parent | dcb681b659f2a0a546752730c9daa92dc6120d52 (diff) |
selftests/bpf: Check length of recv in test_sockmap
The value of recv in msg_loop may be negative, like EWOULDBLOCK, so it's
necessary to check if it is positive before accumulating it to bytes_recvd.
Fixes: 16962b2404ac ("bpf: sockmap, add selftests")
Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Tested-by: Jakub Sitnicki <[email protected]>
Acked-by: John Fastabend <[email protected]>
Link: https://lore.kernel.org/bpf/5172563f7c7b2a2e953cef02e89fc34664a7b190.1716446893.git.tanggeliang@kylinos.cn
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions