Files
rockchip-kernel/kernel
Anton Protopopov f53b37313a bpf: fix potential error return
[ Upstream commit c4441ca86afe4814039ee1b32c39d833c1a16bbc ]

The bpf_remove_insns() function returns WARN_ON_ONCE(error), where
error is a result of bpf_adj_branches(), and thus should be always 0
However, if for any reason it is not 0, then it will be converted to
boolean by WARN_ON_ONCE and returned to user space as 1, not an actual
error value. Fix this by returning the original err after the WARN check.

Signed-off-by: Anton Protopopov <aspsk@isovalent.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20241210114245.836164-1-aspsk@isovalent.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-09 13:32:04 +01:00
..
2025-01-09 13:32:04 +01:00
2024-06-27 13:49:13 +02:00
2024-10-04 16:30:03 +02:00
2023-11-28 17:19:40 +00:00
2024-10-17 15:24:37 +02:00
2023-09-19 13:21:33 -07:00
2024-06-12 11:12:52 +02:00