On Thu, Nov 14 2024 at 10:43, Kunwu Chan wrote: > On 2024/11/12 23:08, Thomas Gleixner wrote: >>> @@ -330,7 +330,7 @@ static long trie_update_elem(struct bpf_map *map, >>> if (key->prefixlen > trie->max_prefixlen) >>> return -EINVAL; >>> >>> - spin_lock_irqsave(&trie->lock, irq_flags); >>> + raw_spin_lock_irqsave(&trie->lock, irq_flags); >>> >>> /* Allocate and fill a new node */ >> Making this a raw spinlock moves the problem from the BPF trie code into >> the memory allocator. On RT the memory allocator cannot be invoked under >> a raw spinlock. > I'am newbiee in this field. But actually when i change it to a raw > spinlock, the problem syzbot reported dispeared. Yes, because the actual code path which is going to trigger this, is not reached. But it will be reached at some point. IIRC, BPF has it's own allocator which can be used everywhere. Thanks, tglx