vma_assert_stabilised(9)
NAME π
vma_assert_stabilised β bestie, this is the assertion that says your VMA canβt just get changed out from underneath you, whether thatβs because a VMA lock or an mmap lock is being held. No cap.
This is from the Kernel API Manual, and the star of the show is literally vma_assert_stabilised(9).
SYNOPSIS β¨
void vma_assert_stabilised (struct vm_area_struct *vma );
ARGUMENTS π
vmaβ the VMA whose stability we want to assess. Thatβs the whole vibe check right there.
DESCRIPTION π¦
Okay so, if lockdep is enabled, we can precisely ensure stability via either an mmap lock owned by us or a specific VMA lock. Slay. Thatβs the precise, locked-down scenario.
With lockdep disabled, though? We may sometimes race with other threads acquiring the mmap read lock at the same time as our VMA read lock. So yeah, thatβs the little caveat, and itβs giving βweβre not fully protected in this modeβ energy. Not me pretending that race doesnβt exist β itβs right there. π
SEE ALSO πΈ
- Kernel file
./include/linux/mmap_lock.h vma_refcount_put(9)vma_start_write_killable(9)vma_assert_write_locked(9)vma_assert_locked(9)
Go check the kernel file and those related functions if you want the full lore. Iykyk. π
Later, bestie β this page is from ./include/linux, dated October 2026, and itβs serving Kernel API Manual realness. Periodt. ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms