dma_buf_unm...ent_unlocked(9)
π¦ 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 π
dma_buf_iter_begin(9)dma_buf_iter_next(9)implicit fence polling(9)dma_buf_set_name(9)dma buf device access(9)dma_buf_export(9)dma_buf_fd(9)dma_buf_fd_install(9)dma_buf_get(9)dma_buf_put(9)locking convention(9)dma_buf_dynamic_attach(9)dma_buf_attach(9)dma_buf_detach(9)dma_buf_pin(9)dma_buf_unpin(9)dma_buf_map_attachment(9)dma_buf_map_attachment_unlocked(9)dma_buf_unmap_attachment(9)dma_buf_attach_revocable(9)dma_buf_invalidate_mappings(9)cpu access(9)dma_buf_begin_cpu_access(9)dma_buf_end_cpu_access(9)dma_buf_mmap(9)dma_buf_vmap(9)dma_buf_vmap_unlocked(9)dma_buf_vunmap(9)dma_buf_vunmap_unlocked(9)
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
- 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