Re: [PATCH bpf] bpf: trace: send signals asynchronously if !preemptible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






On 1/15/25 2:36 AM, Puranjay Mohan wrote:
BPF programs can execute in all kinds of contexts and when a program
running in a non-preemptible context uses the bpf_send_signal() kfunc,
it will cause issues because this kfunc can sleep.

So change `irqs_disabled()` to `!preemptible()` that covers all edge
cases: preempt_count() == 0 and irqs_disabled()

Reported-by: syzbot+97da3d7e0112d59971de@xxxxxxxxxxxxxxxxxxxxxxxxx
Closes: https://lore.kernel.org/all/67486b09.050a0220.253251.0084.GAE@xxxxxxxxxx/
Fixes: 1bc7896e9ef4 ("bpf: Fix deadlock with rq_lock in bpf_send_signal()")
Signed-off-by: Puranjay Mohan <puranjay@xxxxxxxxxx>

Acked-by: Yonghong Song <yonghong.song@xxxxxxxxx>





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux