Skip to contentSkip to conversation

mm-vmalloc-do-not-trigger-bug-on-bh-disabled-context.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message May 22 Stable branch

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/vmalloc: do not trigger BUG() on BH disabled context
has been removed from the -mm tree. Its filename was
mm-vmalloc-do-not-trigger-bug-on-bh-disabled-context.patch

This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Uladzislau Rezki (Sony)" <[email protected]>
Subject: mm/vmalloc: do not trigger BUG() on BH disabled context
Date: Fri, 15 May 2026 17:30:09 +0200

__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().

---

 mm/vmalloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmalloc.c renamed from mm/vmalloc.c~mm-vmalloc-do-not-trigger-bug-on-bh-disabled-context +1 -1
@@ -3203,7 +3203,7 @@ struct vm_struct *__get_vm_area_node(uns
 	struct vm_struct *area;
 	unsigned long requested_size = size;
 
-	BUG_ON(in_interrupt());
+	BUG_ON(in_nmi() || in_hardirq());
 	size = ALIGN(size, 1ul << shift);
 	if (unlikely(!size))
 		return NULL;

_

Patches currently in -mm which might be from [email protected] are