dma_buf_export(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dma_buf_export πŸ’…

okay so bestie, welcome to the Kernel API Manual page for dma_buf_export(9) β€” yes it's a section 9 page, yes it's kernel API, yes we're doing this 🫢


✨ NAME ✨

dma_buf_export β€” makes a brand new dma_buf and hooks it up to an anon file so it can actually be exported, no cap πŸ’– It also wires the allocator-specific data and ops onto the buffer, and gives you a name string for the exporter which is lowkey super useful when you're debugging at 3am 😭


🌸 SYNOPSIS 🌸

struct dma_buf * dma_buf_export (const struct dma_buf_export_info
*exp_info );

πŸŽ€ ARGUMENTS πŸŽ€

  • exp_info [in] β€” this holds literally all the export-related info that the exporter hands over. peek at struct dma_buf_export_info for the deets, iykyk πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

On success it returns a freshly created struct dma_buf object β€” and that object is wrapping the private data and operations you supplied for struct dma_buf_ops ✨ it's giving main character energy fr.

If the ops are missing, or if allocating the struct dma_buf fails, it returns a negative error πŸ’€ so like, check your return value bestie.

For most cases, the easiest way to create exp_info is through the DEFINE_DMA_BUF_EXPORT_INFO macro β€” genuinely the move, obsessed 🧚

🌈 SEE ALSO 🌈

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


πŸ’œ that's the whole page bestie, go export some buffers slay

shoutout to ./drivers/dma-buf for hosting this icon, dated October 2026 β€” periodt, see u in the next manpage πŸŽ€βœ¨

πŸ“¦ where this page comes from