On Thu, Apr 10, 2025 at 8:31 AM Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> wrote: > > Replace all usage of raw_spinlock_t in queue_stack_maps.c with > rqspinlock. This is a map type with a set of open syzbot reports > reproducing possible deadlocks. Prior attempt to fix the issues > was at [0], but was dropped in favor of this approach. > > Make sure we return the -EBUSY error in case of possible deadlocks or > timeouts, just to make sure user space or BPF programs relying on the > error code to detect problems do not break. > > With these changes, the map should be safe to access in any context, > including NMIs. > > [0]: https://lore.kernel.org/all/20240429165658.1305969-1-sidchintamaneni@xxxxxxxxx > > Reported-by: syzbot+8bdfc2c53fb2b63e1871@xxxxxxxxxxxxxxxxxxxxxxxxx > Closes: https://lore.kernel.org/all/0000000000004c3fc90615f37756@xxxxxxxxxx > Reported-by: syzbot+252bc5c744d0bba917e1@xxxxxxxxxxxxxxxxxxxxxxxxx > Closes: https://lore.kernel.org/all/000000000000c80abd0616517df9@xxxxxxxxxx > Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> > --- > kernel/bpf/queue_stack_maps.c | 35 ++++++++++++----------------------- > 1 file changed, 12 insertions(+), 23 deletions(-) pw-bot and pw are down. This patch was applied.