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

enable O_CLOEXEC explicitly to avoid fd leak #13489

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

gneworld
Copy link

Summary

enable O_CLOEXEC explicitly to avoid fd leak

Impact

optee, netdb, localtime

Testing

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
Copy link
Contributor

@acassis acassis left a comment

Choose a reason for hiding this comment

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

Please include commit message explaining why O-CLOEXEC is needed to avoid the fd leak. If possible include a unit test on ostest to detect the leaking

@xiaoxiang781216
Copy link
Contributor

Please include commit message explaining why O-CLOEXEC is needed to avoid the fd leak. If possible include a unit test on ostest to detect the leaking

leaking here means fork/vfork will duplicate fd without O_CLOEXEC flag to the child process.

@acassis
Copy link
Contributor

acassis commented Sep 16, 2024

@xiaoxiang781216 understood. I noticed that there is not a sample code at apps/ to use the optee driver. Please consider including the liboptee to apps/

@xiaoxiang781216
Copy link
Contributor

@xiaoxiang781216 understood. I noticed that there is not a sample code at apps/ to use the optee driver. Please consider including the liboptee to apps/

Ok, but it need time to prepare.

@xiaoxiang781216 xiaoxiang781216 merged commit f6d378e into apache:master Sep 16, 2024
28 checks passed
@gneworld gneworld deleted the work5 branch September 17, 2024 09:27
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.

3 participants