drm_vma_node_allow(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ”₯

  • 0 on 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