-
Notifications
You must be signed in to change notification settings - Fork 1.4k
pkg/sentry: add cleanup to avoid mntns/FSContext refcount leak #12055
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
Conversation
thanks! |
0b61c41
to
cc50e27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
cc50e27
to
523f581
Compare
Please hold off on this PR — it appears that even with this patch, the filesystem leaks for gofer, overlay, and tmpfs can still be triggered using the method described in the issue. I'm currently investigating the root cause and will include the fix in this PR. |
523f581
to
7c18f54
Compare
The root cause has been identified: the cc @ayushr2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Currently, on certain error paths during task creation (e.g., when "runsc exec" fails), we do not properly handle the refcount of the mntns/FSContext, leading to a refcount leak. This patch adds cleanup that would be released before the reference ownership is transferred to callee, ensuring that the refcount is correctly decremented. Fixes google#12054 Signed-off-by: Tianyu Zhou <albert.zty@antgroup.com>
7c18f54
to
512b9a4
Compare
Currently, on certain error paths during task creation (e.g., when "runsc exec" fails), we do not properly handle the refcount of the mount namespace, leading to a refcount leak. This patch adds cleanup that would be released before the reference ownership is transferred to callee, ensuring that the refcount is correctly decremented. Fixes #12054 FUTURE_COPYBARA_INTEGRATE_REVIEW=#12055 from tianyuzhou95:albert/refcount 512b9a4 PiperOrigin-RevId: 797155567
Currently, on certain error paths during task creation (e.g., when "runsc exec" fails), we do not properly handle the refcount of the mount namespace, leading to a refcount leak. This patch adds cleanup that would be released before the reference ownership is transferred to callee, ensuring that the refcount is correctly decremented. Fixes #12054 FUTURE_COPYBARA_INTEGRATE_REVIEW=#12055 from tianyuzhou95:albert/refcount 512b9a4 PiperOrigin-RevId: 797155567
Currently, on certain error paths during task creation (e.g., when "runsc exec" fails), we do not properly handle the refcount of the mount namespace, leading to a refcount leak. This patch adds cleanup that would be released before the reference ownership is transferred to callee, ensuring that the refcount is correctly decremented. Fixes #12054 FUTURE_COPYBARA_INTEGRATE_REVIEW=#12055 from tianyuzhou95:albert/refcount 512b9a4 PiperOrigin-RevId: 797155567
Currently, on certain error paths during task creation (e.g., when "runsc exec" fails), we do not properly handle the refcount of the mount namespace, leading to a refcount leak. This patch adds cleanup that would be released before the reference ownership is transferred to callee, ensuring that the refcount is correctly decremented. Fixes #12054 FUTURE_COPYBARA_INTEGRATE_REVIEW=#12055 from tianyuzhou95:albert/refcount 512b9a4 PiperOrigin-RevId: 797155567
Currently, on certain error paths during task creation (e.g., when "runsc exec" fails), we do not properly handle the refcount of the mount namespace, leading to a refcount leak. This patch adds cleanup that would be released before the reference ownership is transferred to callee, ensuring that the refcount is correctly decremented. Fixes #12054 FUTURE_COPYBARA_INTEGRATE_REVIEW=#12055 from tianyuzhou95:albert/refcount 512b9a4 PiperOrigin-RevId: 800615196
Currently, on certain error paths during task creation (e.g., when "runsc exec" fails), we do not properly handle the refcount of the mount namespace, leading to a refcount leak. This patch adds cleanup that would be released before the reference ownership is transferred to callee, ensuring that the refcount is correctly decremented. Fixes #12054 FUTURE_COPYBARA_INTEGRATE_REVIEW=#12055 from tianyuzhou95:albert/refcount 512b9a4 PiperOrigin-RevId: 800615196
Currently, on certain error paths during task creation (e.g., when "runsc exec" fails), we do not properly handle the refcount of the mount namespace, leading to a refcount leak. This patch adds cleanup that would be released before the reference ownership is transferred to callee, ensuring that the refcount is correctly decremented. Fixes #12054 FUTURE_COPYBARA_INTEGRATE_REVIEW=#12055 from tianyuzhou95:albert/refcount 512b9a4 PiperOrigin-RevId: 800615196
Currently, on certain error paths during task creation (e.g., when "runsc exec" fails), we do not properly handle the refcount of the mount namespace, leading to a refcount leak. This patch adds cleanup that would be released before the reference ownership is transferred to callee, ensuring that the refcount is correctly decremented. Fixes #12054 FUTURE_COPYBARA_INTEGRATE_REVIEW=#12055 from tianyuzhou95:albert/refcount 512b9a4 PiperOrigin-RevId: 800615196
Currently, on certain error paths during task creation (e.g., when "runsc exec" fails), we do not properly handle the refcount of the mount namespace, leading to a refcount leak. This patch adds cleanup that would be released before the reference ownership is transferred to callee, ensuring that the refcount is correctly decremented.
Fixes #12054