On 2024-06-13 12:23:46 [+0200], Dmitry Dolgov wrote: > > On Wed, Jun 12, 2024 at 04:32:23PM GMT, Sebastian Andrzej Siewior wrote: > > > > > The BPF program in question is attached to sched_switch. The issue seems > > > to be similar to a couple of syzkaller reports [1], [2], although the > > > latter one is about nested progs, which seems to be not the case here. > > > Talking about nested progs, applying a similar approach as in [3] > > > reworked for bpf_ringbuf, elliminates the issue. > > > > > > Do I miss anything, is it a known issue? Any ideas how to address that? > > > > I haven't attached bpf program to trace-events so this new to me. But if > > you BPF attach programs to trace-events then there might be more things > > that can go wrong… > > Things related to RT kernels, or something else? Related to RT kernel. The trace-event is invoked with disabled preemption. This means locking is limit to raw_spinlock_t and no memory allocation are allowed. Otherwise the splat below will appear. Sebastian