Skip to content

Fix races in Linux file descriptor duplication - #1181

Merged
Weiteng Chen (CvvT) merged 4 commits into
mainfrom
weiteng/fix_dup
Sep 2, 2026
Merged

Fix races in Linux file descriptor duplication#1181
Weiteng Chen (CvvT) merged 4 commits into
mainfrom
weiteng/fix_dup

Conversation

@CvvT

Copy link
Copy Markdown
Contributor

Fix #1170: keep FD allocation and exact replacement atomic under the raw descriptor table lock.

@wdcui

Copy link
Copy Markdown
Member

Jay Bosamiya (Microsoft) (@jaybosamiya-ms) maybe you should review this fd-related fix?

@CvvT
Weiteng Chen (CvvT) force-pushed the weiteng/fix_dup branch 2 times, most recently from c0193ca to 69362a3 Compare August 17, 2026 22:09

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally seems reasonable to me, just a couple of points; the biggest being that I am not sure why max_fd changed to fd_limit as part of this change; seems unrelated to the goal of this PR to fix the races, no?

Comment thread litebox_shim_linux/src/syscalls/file.rs Outdated
Comment thread litebox_shim_linux/src/syscalls/file.rs Outdated
Comment thread litebox_shim_linux/src/syscalls/file.rs
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

🤖 SemverChecks 🤖 No breaking API changes detected

Note: this does not mean API is unchanged, or even that there are no breaking changes; simply, none of the detections triggered.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Weiteng!

@CvvT
Weiteng Chen (CvvT) added this pull request to the merge queue Sep 2, 2026
Merged via the queue into main with commit 377309f Sep 2, 2026
16 checks passed
@CvvT
Weiteng Chen (CvvT) deleted the weiteng/fix_dup branch September 2, 2026 17:48
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.

shim_linux fd-table dup lock is released between inserting the new fd and closing it

3 participants