drm_vma_node_allow(9)
π drm_vma_node_allow(9) β the Kernel API Manual moment
okay so bestie, you're in the Kernel API Manual and this one's about drm_vma_node_allow(9). sit down, hydrate, let's get into it π«Ά
β¨ NAME β¨
drm_vma_node_allow β add an open-file to the list of allowed users π
πΈ SYNOPSIS πΈ
int drm_vma_node_allow (struct drm_vma_offset_node *node , struct drm_file *tag );
π ARGUMENTS π
nodeβ the node you're modifying, that's the whole vibe here πtagβ the tag of the file to remove. yes, "remove" β that's literally what the label says, i'm just the messenger π
π¦ DESCRIPTION π¦
So you're adding tag to this node's list of allowed open-files. iconic behaviour. and if tag is already on that list? no drama, the ref-count just gets incremented. lowkey clean β¨
Now the part that's giving main character energy: the list of allowed-users is preserved across drm_vma_offset_add and drm_vma_offset_remove calls. like, it survives. it's resilient. we love that π
And yes, you may even call this if the node is currently not added to any offset-manager. go off, honestly π
β οΈ BUT β and this is the serious bit, bestie β you must remove all open-files the same number of times as you added them before destroying the node. otherwise you will leak memory. not cute. do not do that π
Also it's locked against concurrent access internally, so you don't have to worry about that yourself. she handles it π§
π₯ RETURN π₯
0on success β slay β- a negative error code on internal failure (out-of-mem) β sad girl hours π
π SEE ALSO π
Kernel file ./drivers/gpu/drm/drm_vma_manager.c vma offset manager(9), drm_vma_offset_manager_init(9), drm_vma_offset_manager_destroy(9), drm_vma_offset_lookup_locked(9), drm_vma_offset_add(9), drm_vma_offset_remove(9), drm_vma_node_allow_once(9), drm_vma_node_revoke(9), drm_vma_node_is_allowed(9)
the whole friend group, fr fr π
anyway that's the page, go be normal about ref-counts π
this one came from ./drivers/gpu/drm, dated October 2026 β mwah, sending you off with a kiss πβ¨
π¦ 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