dma_buf_vmap_unlocked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ dma_buf_vmap_unlocked(9) ✨

okay so welcome to the Kernel API Manual bestie, today we're looking at dma_buf_vmap_unlocked(9) and honestly she's giving "does one thing and does it well" πŸ’…


🌸 NAME 🌸

dma_buf_vmap_unlocked β€” Create virtual mapping for the buffer object into kernel address space. Same restrictions as for vmap and friends apply.

no cap, that "same restrictions as for vmap and friends" part is doing a LOT of heavy lifting there, so don't sleep on it 🫢

πŸŽ€ SYNOPSIS πŸŽ€

int dma_buf_vmap_unlocked (struct dma_buf *dmabuf , struct iosys_map
*map );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dmabuf [in] β€” buffer to vmap. this is the main character, the thing you're mapping ✨
  • map [out] β€” returns the vmap pointer. she's an output param, so she gets filled in for you, you don't fill her πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

Unlocked version of dma_buf_vmap.

Returns 0 on success, or a negative errno code otherwise.

literally that's it, that's the whole vibe. but fr fr check your return value β€” a negative errno is not a slay, it's a signal that something went sideways 😭

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/dma-buf/dma-buf.c and the whole friend group:

like yes that's a long list but she's thorough and we respect it πŸ‘‘


okay and for the cute sign-off: this icon lives in ./drivers/dma-buf, she's dated October 2026, and her full name for the group chat is dma_buf_vmap_unlocked(9). bye bestie, map responsibly πŸŒˆπŸ’–

πŸ“¦ where this page comes from