Skip to content

drm: check for EINVAL when dropping master#2057

Open
amshafer wants to merge 1 commit into
Smithay:masterfrom
amshafer:master
Open

drm: check for EINVAL when dropping master#2057
amshafer wants to merge 1 commit into
Smithay:masterfrom
amshafer:master

Conversation

@amshafer

@amshafer amshafer commented Jun 9, 2026

Copy link
Copy Markdown

Description

When using DRM leasing on the NVIDIA driver smithay may run into an error while trying to release master during DrmLeaseState::new()->get_non_master_fd(). The NVIDIA driver marks all clients as authenticated, so when smithay does the get_client() call it erroneously assumes the fd has master and tries to drop it. Dropping master fails since the fd never had it to begin with.

This change checks for EINVAL while releasing master. If we see EINVAL returned then we know that the fd, while potentially marked as authenticated, did not have master and therefore was unable to drop it.

Open to suggestions if you do not think this is the right fix.

Checklist

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.

1 participant