diff options
author | 2024-04-30 13:19:51 -0700 | |
---|---|---|
committer | 2024-05-02 16:41:02 -0700 | |
commit | 00f0e08f23fc007f4a5a71cd7e37fcdb15af0c1b (patch) | |
tree | 9bf2f7de3fb366f9cda9f3566132e53885be313c /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | Merge branch 'Add new args into tcp_congestion_ops' cong_control' (diff) | |
download | wireguard-linux-00f0e08f23fc007f4a5a71cd7e37fcdb15af0c1b.tar.xz wireguard-linux-00f0e08f23fc007f4a5a71cd7e37fcdb15af0c1b.zip |
libbpf: fix potential overflow in ring__consume_n()
ringbuf_process_ring() return int64_t, while ring__consume_n() assigns
it to int. It's highly unlikely, but possible for ringbuf_process_ring()
to return value larger than INT_MAX, so use int64_t. ring__consume_n()
does check INT_MAX before returning int result to the user.
Fixes: 4d22ea94ea33 ("libbpf: Add ring__consume_n / ring_buffer__consume_n")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20240430201952.888293-1-andrii@kernel.org
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions