dma_buf_detach(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so this is the dma_buf_detach(9) page from the Kernel API Manual, and it does exactly one iconic job: Remove the given attachment from dmabuf's attachments list. That's the whole vibe. πŸ’…

✨ SYNOPSIS ✨

void dma_buf_detach (struct dma_buf *dmabuf , struct dma_buf_attachment *attach );

πŸŽ€ ARGUMENTS πŸŽ€

  • dmabuf β€” [in] buffer to detach from. Like, the buffer we're saying bye to 🫢
  • attach β€” [in] attachment to be detached; is free'd after this call. That's not a drill, bestie: it is free'd after this call 😭

πŸ’… DESCRIPTION πŸ’…

This is the cleanup girlie for a device attachment you got by calling dma_buf_attach. So if dma_buf_attach was the "hey bestie" moment, dma_buf_detach is the graceful exit. ✨

Optionally, this calls dma_buf_ops.detach for device-specific detach. So the generic detach can also do the device-specific one β€” optional, but very much part of the lore. πŸ¦‹

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file: ./drivers/dma-buf/dma-buf.c

xoxo, source/version ./drivers/dma-buf, October 2026 πŸ’–

πŸ“¦ where this page comes from