dma_buf_set_name(9)
β¨ dma_buf_set_name(9) β¨
okay so bestie, welcome to the Kernel API Manual entry for dma_buf_set_name β yes it's a real one, yes it's in the kernel, and yes we're gonna get through it together π
π NAME π
dma_buf_set_name β gives a specific dma_buf a name so you can actually track the usage, bestie. Like putting a little sticky note on your iced coffee so nobody at the office drinks it π₯€
And the iconique part? It could also support changing the name of the dma-buf if the same piece of memory is used for multiple purposes between different devices. one memory, many eras, main character energy β¨
π¦ SYNOPSIS π¦
long dma_buf_set_name (struct dma_buf *dmabuf , const char __user *buf );
πΈ ARGUMENTS πΈ
dmabuf[in] β the dmabuf buffer that will be renamed. this is the one getting the glow-up π«Άbuf[in] β a piece of userspace memory that contains the name of the dma-buf. like, the name lives over there in userspace andbufis the pointer to it, that's the whole vibe.
π DESCRIPTION π
Returns 0 on success. slay, we love a 0 π₯
But β and hear me out β if the dma-buf buffer is already attached to devices, it returns -EBUSY. no renaming mid-attachment, periodt. the buffer is booked and busy π
π SEE ALSO π
Kernel file ./drivers/dma-buf/dma-buf.c plus the whole friend group π:
dma_buf_iter_begin(9)dma_buf_iter_next(9)implicit fence polling(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_unmap_attachment_unlocked(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)
that's the whole page, no notes π
and fr fr, this one came from the ./drivers/dma-buf directory, dated October 2026 β go yell about dma-bufs at your local kernel dev, ily, bye π§π«
π¦ 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