Repository navigation
fix named_mutex to open file descriptors lazily - #14861
Merged
remibettan merged 3 commits intoMar 31, 2026
Merged
remibettan merged 3 commits into
remibettan merged 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR changes the Linux V4L2 named_mutex implementation to avoid holding an open device file descriptor for the lifetime of the mutex object by opening it lazily on first lock()/try_lock() and closing it on final unlock(). This is intended to reduce issues around hardware resets while the process is running (RSDSO-20602).
Changes:
- Initialize
named_mutex::_fildesto-1and deferopen()until the first lock acquisition. - Close the FD on the last
unlock()and guard destructorclose()behind_fildes >= 0. - Add lazy-open logic to both
lock()andtry_lock().
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
remibettan
force-pushed
the
linux_backend_dev_video_change_hw_reset_fix
branch
from
March 29, 2026 13:45
020a8e0 to
3ef6717
Compare
OhadMeir
reviewed
Mar 30, 2026
remibettan
force-pushed
the
linux_backend_dev_video_change_hw_reset_fix
branch
from
March 30, 2026 10:43
3ef6717 to
8e5c5ea
Compare
Nir-Az
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracked by: RSDSO-20602