dma_buf_unm...ent_unlocked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ dma_buf_unm...ent_unlocked(9) πŸ¦‹

okay so you've wandered into the Kernel API Manual bestie, welcome, pull up a chair πŸ’– this one's about dma_buf_unmap_attachment_unlocked and it's lowkey a baddie that cleans up after itself. let's get into it ✨


🌸 NAME 🌸

dma_buf_unmap_attachment_unlocked β€” unmaps and decreases usecount of the buffer; might deallocate the scatterlist associated. Is a wrapper for unmap_dma_buf() of dma_buf_ops.

like, yes she unmaps, yes she drops the usecount, and yeah she might fully deallocate the scatterlist that's attached β€” no promises, she's mysterious like that πŸ’… and also? she's just a wrapper for unmap_dma_buf() of dma_buf_ops. iconic behavior fr fr.


✨ SYNOPSIS ✨

void dma_buf_unmap_attachment_unlocked (struct dma_buf_attachment
*attach , struct sg_table *sg_table , enum dma_data_direction direction
);

she returns void, she takes three things, she's not here to chat 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • attach β€” [in] attachment to unmap buffer from. like, which attachment are we unmapping from? this one. that's the vibe 🌈
  • sg_table β€” [in] scatterlist info of the buffer to unmap. the scatterlist tea, basically πŸ“
  • direction β€” [in] direction of DMA transfer. yes it matters, no you can't skip it πŸ’€

πŸ”₯ DESCRIPTION πŸ”₯

Unlocked variant of dma_buf_unmap_attachment. that's it, that's the whole description, she said what she said periodt πŸ‘‘

⚠️ heads up bestie: the unlocked in the name is doing real work β€” this is the unlocked variant, not the locking one. don't confuse the two, iykyk πŸ™ˆ

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/dma-buf/dma-buf.c β€” go read it, it's giving main character energy πŸ‘‘


and that's the whole page, bestie, you ate that 🫢 this lil gem lives over in ./drivers/dma-buf, dated October 2026, and it's brought to you by the Kernel API Manual herself. go forth and unmap responsibly πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from