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

agent: hold lock while setting new policy #8735

Merged
merged 1 commit into from Jan 4, 2024

Conversation

danmihai1
Copy link
Contributor

Don't release the lock between is_allowed and set_policy calls, because the policy might change in between these calls.

Also, move more policy code into policy.rs.

Fixes: #8734

@katacontainersbot katacontainersbot added the size/medium Average sized task label Dec 26, 2023
Copy link
Member

@fidencio fidencio left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @danmihai1!

Don't release the lock between is_allowed and set_policy calls,
because the policy might change in between these calls.

Also, move more policy code into policy.rs.

Fixes: kata-containers#8734

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
@danmihai1
Copy link
Contributor Author

/test

@danmihai1 danmihai1 merged commit b18f269 into kata-containers:main Jan 4, 2024
167 of 175 checks passed
@danmihai1 danmihai1 deleted the danmihai1/set-policy branch January 4, 2024 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test size/medium Average sized task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

agent: hold lock while setting new policy
4 participants