Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bus/driver: duplicate FDs for queued messages #354

Merged
merged 2 commits into from
Apr 11, 2024
Merged

Conversation

dvdhrm
Copy link
Member

@dvdhrm dvdhrm commented Apr 11, 2024

Duplicate FDs for queued messages to ensure they stay around until a message is queued. This fixes a bug where we might try to send messages referencing closed file-descriptors.

dvdhrm added 2 commits April 11, 2024 14:49
Create a new constructor that duplicates the provided FDs and thus takes
ownership of the FDs, but does not borrow the FDs of the caller.

Signed-off-by: David Rheinsberg <[email protected]>
Duplicate all FDs attached to a message when queuing it for sending.
Messages can be queued for arbitrary times, so we cannot rely on
borrowed FDs to be available for long enough.

Reported-by: Camron Carter <[email protected]>
Signed-off-by: David Rheinsberg <[email protected]>
@dvdhrm dvdhrm merged commit 4800047 into bus1:main Apr 11, 2024
37 checks passed
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