Skip to content

nvidia-drm: defer nv_drm_device free until final DRM reference - #1336

Open
irontom10 wants to merge 1 commit into
NVIDIA:mainfrom
irontom10:fix/nvidia-drm-device-lifetime
Open

nvidia-drm: defer nv_drm_device free until final DRM reference#1336
irontom10 wants to merge 1 commit into
NVIDIA:mainfrom
irontom10:fix/nvidia-drm-device-lifetime

Conversation

@irontom10

Copy link
Copy Markdown

drm_dev_unplug() does not guarantee that userspace drm_file, GEM, or fence objects have been released. Those objects may retain nv_drm_device references and invoke cleanup later from drm_release().

Keep nv_drm_device alive as a DRM-managed resource and free it only when the final drm_dev_put() occurs. This prevents late fence teardown from dereferencing a freed nv_drm_device after surprise GPU removal.

drm_dev_unplug() does not guarantee that userspace drm_file, GEM, or fence
objects have been released. Those objects may retain nv_drm_device references
and invoke cleanup later from drm_release().

Keep nv_drm_device alive as a DRM-managed resource and free it only when the
final drm_dev_put() occurs. This prevents late fence teardown from
dereferencing a freed nv_drm_device after surprise GPU removal.
@CLAassistant

CLAassistant commented Sep 4, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants