kunmap_atomic(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… kunmap_atomic(9) πŸ’…

okay so welcome to the Kernel API Manual, bestie β€” today's main character is kunmap_atomic, and the vibe is β€œunmap that atomic mapping, but make it deprecated.” 🫢


🌸 NAME 🌸

kunmap_atomic β€” unmaps the virtual address that was mapped by kmap_atomic() β€” and yes, it is deprecated! πŸ’€


✨ SYNOPSIS ✨

kunmap_atomic (__addr );

πŸŽ€ ARGUMENTS πŸŽ€

  • __addr β€” the virtual address you want unmapped, periodt. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

So this function unmaps an address that was previously mapped by kmap_atomic, and it re-enables pagefaults. Depending on the PREEMPT_RT configuration, it also re-enables migration and preemption. But do not count on those side effects, bestie β€” they're literally conditional, no cap. πŸ™ˆ

Mappings should be unmapped in the reverse order that they were mapped. See kmap_local_page for details on nesting. 🧚

__addr can be any address within the mapped page, so there is no need to subtract any offset that has been added. In contrast to kunmap, this function takes the address returned from kmap_atomic, not the page passed to it. And the compiler will warn you if you pass the page β€” it's giving β€œI know what you did” energy. 😭

🚨 Also, reminder: this whole thing is deprecated! So maybe don't start a new situationship with it. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯


big mwah from the ./include/linux girlies, dated October 2026, page kunmap_atomic(9) β€” slay and stay unmapped πŸ’œ

πŸ“¦ where this page comes from