dma_buf_fd_install(9)
π dma_buf_fd_install(9) β the Kernel API Manual glow-up
okay bestie, so like⦠this is from the Kernel API Manual, and honestly? she's a short one but she's important. no cap.
β¨ NAME β¨
dma_buf_fd_install β installs a reserved fd for a dma-buf π
like⦠it literally takes your little pre-booked fd and makes it real. main character energy tbh.
πΈ SYNOPSIS πΈ
void dma_buf_fd_install (struct dma_buf *dmabuf , int fd );
that's it. that's the whole vibe. no return value, she just does the thing. π¦
π ARGUMENTS π
dmabufβ [in] pointer todma_buf. the actual buffer object in question, your little guy.fdβ [in] fd reserved withget_unused_fd_flags. note the "reserved" β you already called dibs on this number and now you're cashing it in.
π DESCRIPTION π
Publishes a previously reserved fd into the caller's fd table. lowkey iconic behaviour β the fd was in limbo and now she's officially published, like dropping a group chat screenshot to the story. β¨
β οΈ big important warning, seriously bestie: Must only be called after all fallible work (e.g. copy_to_user) has succeeded, as it cannot be undone safely once called. π like, there's no undo button, no ctrl+z, no "wait nvm". once she's in the fd table, she's IN. so do all your risky stuff FIRST, then call this. periodt. π
The caller is responsible for having emitted the trace event (via dma_buf_fd or get_unused_fd_flags + this function) before calling this. so β trace event first, then this. the order is not a suggestion, it's the whole point. π«Ά
π¦ SEE ALSO π¦
buckle up, this list is long, but she ate and left no crumbs π
- Kernel file
./drivers/dma-buf/dma-buf.cdma_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_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)
π and that's the page!! sourced straight out of ./drivers/dma-buf, dated October 2026, filed under dma_buf_fd_install(9) β go forth and install those fds responsibly, bestie πππ§
π¦ 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