dma_fence_driver_name(9)
β¨ 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 likedma_fence.lockand memory that thedma_fence.opsfunctions 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:
- DMA fences overview(9)
- fence cross-driver contract(9)
dma_fence_get_stub(9)dma_fence_allocate_private_stub(9)dma_fence_context_alloc(9)- fence signalling annotation(9)
dma_fence_begin_signalling(9)dma_fence_end_signalling(9)dma_fence_signal_timestamp_locked(9)dma_fence_signal_timestamp(9)dma_fence_signal_locked(9)dma_fence_check_and_signal_locked(9)dma_fence_check_and_signal(9)dma_fence_signal(9)dma_fence_wait_timeout(9)dma_fence_release(9)dma_fence_free(9)dma_fence_enable_signaling(9)dma_fence_add_callback(9)dma_fence_get_status(9)dma_fence_remove_callback(9)dma_fence_default_wait(9)dma_fence_wait_any_timeout(9)- deadline hints(9)
dma_fence_set_deadline(9)dma_fence_describe(9)dma_fence_init(9)dma_fence_init64(9)dma_fence_timeline_name(9)
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
- 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