Files
linux/kernel/bpf
Alexei Starovoitov 1ace9bac1a bpf: Prevent reentrance into call_rcu_tasks_trace()
call_rcu_tasks_trace() is not safe from in_nmi() and not reentrant.
To prevent deadlock on raw_spin_lock_rcu_node(rtpcp) or memory corruption
defer to irq_work when IRQs are disabled. call_rcu_tasks_generic()
protects itself with local_irq_save().
Note when bpf_async_cb->refcnt drops to zero it's safe to reuse
bpf_async_cb->worker for a different irq_work callback, since
bpf_async_schedule_op() -> irq_work_queue(&cb->worker);
is only called when refcnt >= 1.

Fixes: 1bfbc267ec ("bpf: Enable bpf_timer and bpf_wq in any context")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260205190233.912-1-alexei.starovoitov@gmail.com
2026-02-05 11:47:08 -08:00
..
2024-08-30 08:55:26 -07:00
2024-08-30 08:55:26 -07:00
2026-02-02 18:43:33 -08:00
2026-01-31 13:51:04 -08:00
2025-08-12 14:56:04 -07:00
2025-11-05 17:53:23 -08:00
2024-08-30 08:55:26 -07:00
2024-08-30 08:57:47 -07:00
2025-07-11 11:00:57 -07:00
2026-02-04 13:22:39 -08:00