dma_fence_driver_name(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ dma_fence_driver_name(9) ✨

okay so this is a page from the Kernel API Manual (the 9 section, kernel API stuff, iykyk) and it's all about dma_fence_driver_name πŸ’…


🌸 NAME 🌸

dma_fence_driver_name β€” get that driver name, bestie πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

const char __rcu * dma_fence_driver_name (struct dma_fence *fence );

πŸŽ€ ARGUMENTS πŸŽ€

  • fence β€” the fence we're querying, like "hey girl who's your driver" 🫢

πŸ”₯ DESCRIPTION πŸ”₯

So it returns the driver name that's backing the dma-fence implementation. Simple enough, right? ngl the name part is the easy part β€” it's the fine print that's giving main character energy 😭

IMPORTANT CONSIDERATION: the dma-fence contract is literally so strict about this. Access to driver-provided data (meaning data that is not directly embedded into the object itself) β€” things like dma_fence.lock and memory that the dma_fence.ops functions might access β€” is forbidden after the fence has been signalled. Drivers are allowed to free that data, and some do. πŸ’€

So to make access safe, drivers are mandated to guarantee an RCU grace period between signalling the fence and freeing said data. No shortcuts, periodt.

Which means: access to the driver name is only valid inside a RCU locked section. The pointer MUST be both queried and USED ONLY WITHIN a SINGLE block guarded by the rcu_read_lock and rcu_read_unlock pair. Like, both. The same block. One block. Don't be out here grabbing the pointer in one place and using it somewhere else πŸ™ˆ


🌈 SEE ALSO 🌈

Kernel file ./drivers/dma-buf/dma-fence.c, plus the whole friend group:


that's the whole page, bestie βœ¨πŸ’œ this one lives under ./drivers/dma-buf and it's dated October 2026 β€” go off, kernel docs πŸ‘‘πŸ¦‹ mwah πŸ’‹

πŸ“¦ where this page comes from