mmap_action_complete(9)
πΈ mmap_action_complete β NAME πΈ
okay so bestie, this is mmap_action_complete from the Kernel API Manual (section 9, the big-kid kernel-functions section, iykyk), and it does exactly one thing: it executes a VMA descriptor action β¨
π SYNOPSIS π
int mmap_action_complete (struct vm_area_struct *vma , struct
mmap_action *action , bool is_compat );
like, yes, it takes three things and gives you back an int. she's lowkey simple. π«Ά
π ARGUMENTS π
vmaβ the VMA you're doing the action upon. she's the main character of this call πactionβ the action itself. this is the thing that's actually gonna happen.is_compatβ is this being invoked from the compatibility layer? yes/no, that's the whole vibe check. π
β¨ DESCRIPTION β¨
Similar to mmap_action_prepare.
that's it. that's the whole description. not me expecting a whole essay and getting one line π literally the most mysterious queen in the kernel API, no cap. if you wanna know how it works, go read mmap_action_prepare (she's in SEE ALSO, obvs π).
π₯ RETURN π₯
0on success π slay, we ate, nothing to worry about- or error β and bestie, listen, this part matters: at which point the VMA will be unmapped if
!is_compat. so if you're not coming from the compat layer and this thing errors out, the VMA gets unmapped. no VMA for you. π keep that in mind fr fr.
β οΈ real talk: on error with !is_compat, the VMA is gone. that's not a vibe, that's just the contract.
π¦ SEE ALSO π¦
kernel file ./mm/util.c π and literally the whole friend group:
kfree_const(9)__kmemdup_nul(9)kstrdup(9)kstrdup_const(9)kstrndup(9)kmemdup(9)kmemdup_array(9)kvmemdup(9)kmemdup_nul(9)memdup_user(9)vmemdup_user(9)strndup_user(9)memdup_user_nul(9)randomize_page(9)__account_locked_vm(9)account_locked_vm(9)__vmalloc_array(9)vmalloc_array(9)__vcalloc(9)vcalloc(9)folio_mapping(9)folio_copy(9)get_cmdline(9)mem_dump_obj(9)compat_set_desc_from_vma(9)__compat_vma_mmap(9)compat_vma_mmap(9)snapshot_page(9)mmap_action_prepare(9)folio_pte_batch(9)page_range_contiguous(9)
β¨ and that's the page, bestie β¨ this one came from source ./mm, dated October 2026, filed under the Kernel API Manual β go forth and complete your actions responsibly π
ππ
π¦ 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