Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[1.4] libct: close child fds on prepareCgroupFD error#4936

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@cyphar
Copy link
Member

Backport of#4930


The(*setns).start is supposed to close child fds once the child has started, or upon returning an error.
There was no code to return an error before calling start, but commit5af4dd4 added it, together with
a bug -- child fds are not closed if prepareCgroupFD fails.

I'm not sure ifhow to add a good test case for it. Found when working on PR#4928 (which modified the code
to read the child logs even when start() fails).

Fixes:5af4dd4 / PR#4812.


This PR also includes the refactoring of start to avoid similar problems in the future.

kolyshkinand others added2 commitsOctober 16, 2025 09:40
The (*setns).start is supposed to close child fds once the child hasstarted, or upon an error. Commit5af4dd4 added a bug -- child fdsare not closed if prepareCgroupFD fails.Fix by adding a missing call to closeChild.I'm not sure how to write a good test case for it. Found when workingon PR 4928 (and tested in there).Fixes:5af4dd4Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>(cherry picked from commit4e26250)Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Factor startWithCgroupFD out of start to reduce the start complexity.This also implements a more future-proof way of calling p.comm.closeChild.Co-authored-by: lifubang <lifubang@acmcoder.com>Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>(cherry picked from commit871052b)Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
@cypharcyphar added this to the1.4.0 milestoneOct 15, 2025
@cypharcyphar added the backport/1.4-prA backport PR to release-1.4 labelOct 15, 2025
Copy link
Contributor

@kolyshkinkolyshkin left a comment

Choose a reason for hiding this comment

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

lgtm

@lifubanglifubang merged commit1984e2c intoopencontainers:release-1.4Oct 16, 2025
36 checks passed
@lifubanglifubang mentioned this pull requestNov 26, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@lifubanglifubanglifubang approved these changes

@kolyshkinkolyshkinkolyshkin approved these changes

Assignees

No one assigned

Labels

backport/1.4-prA backport PR to release-1.4

Projects

None yet

Milestone

1.4.0

Development

Successfully merging this pull request may close these issues.

3 participants

@cyphar@lifubang@kolyshkin

[8]ページ先頭

©2009-2025 Movatter.jp