Re: [PATCH] mm/vmalloc: Do not trigger BUG() on BH disabled context
From: Uladzislau Rezki
Date: Tue May 19 2026 - 12:27:49 EST
On Mon, May 18, 2026 at 04:10:12PM -0700, Andrew Morton wrote:
> On Fri, 15 May 2026 17:30:09 +0200 "Uladzislau Rezki (Sony)" <urezki@xxxxxxxxx> wrote:
>
> > __get_vm_area_node() currently triggers a BUG() if in_interrupt()
> > returns true. However, in_interrupt() also reports true when BH
> > are disabled.
> >
> > The bridge code can call rhashtable_lookup_insert_fast() with
> > bottom halves disabled:
> >
> > __vlan_add()
> > -> br_fdb_add_local()
> > spin_lock_bh(&br->hash_lock); <-- Disable BH
> > -> fdb_add_local()
> > -> fdb_create()
> > -> rhashtable_lookup_insert_fast()
> > -> kvmalloc()
> > -> vmalloc()
> > -> __get_vm_area_node()
> > -> BUG_ON(in_interrupt())
> > spin_unlock_bh(&br->hash_lock)
> >
> > this triggers the BUG() despite the caller not being in NMI or
> > hard IRQ context.
> >
> > Replace the in_interrupt() check with in_nmi() || in_hardirq().
> >
> > Cc: Ido Schimmel <idosch@xxxxxxxxxx>
> > Fixes: c6307674ed82 ("mm: kvmalloc: add non-blocking support for vmalloc")
>
> Was added in 6.19 so I assumed we want cc:stable on this.
>
Thank you. Yep, we want cc:stable!
--
Uladzislau Rezki