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

btf: fix race in mutableTypes.copy #1358

Merged
merged 1 commit into from Feb 22, 2024
Merged

btf: fix race in mutableTypes.copy #1358

merged 1 commit into from Feb 22, 2024

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Feb 22, 2024

We reference mt.copiedTypeIDs during copy to be able to figure out the correct ID for a copied type. This access can currently race with mutableTypes.add since we don't protect mt.copiedTypeIDs.

Take a read lock to prevent modification.

We reference mt.copiedTypeIDs during copy to be able to figure out
the correct ID for a copied type. This access can currently race
with mutableTypes.add since we don't protect mt.copiedTypeIDs.

Take a read lock to prevent modification.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb requested a review from a team as a code owner February 22, 2024 15:28
@lmb lmb requested review from ti-mo and rgo3 February 22, 2024 16:00
@lmb lmb merged commit d80392a into cilium:main Feb 22, 2024
15 checks passed
@lmb lmb deleted the btf-copy-race branch February 22, 2024 18:24
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.

None yet

1 participant