Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf: Use this_cpu_{inc_return|dec} for prog->active
[ Upstream commit c89e843 ] Both __this_cpu_inc_return() and __this_cpu_dec() are not preemption safe and now migrate_disable() doesn't disable preemption, so the update of prog-active is not atomic and in theory under fully preemptible kernel recurisve prevention may do not work. Fixing by using the preemption-safe and IRQ-safe variants. Fixes: ca06f55 ("bpf: Add per-program recursion prevention mechanism") Signed-off-by: Hou Tao <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin KaFai Lau <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
- Loading branch information