Skip to content

Comments

btf: fix race when loading cached kernel (module)? spec#1848

Merged
lmb merged 1 commit intocilium:mainfrom
paulcacheux:fix-loadCachedKernelSpec-slow-path-race
Aug 15, 2025
Merged

btf: fix race when loading cached kernel (module)? spec#1848
lmb merged 1 commit intocilium:mainfrom
paulcacheux:fix-loadCachedKernelSpec-slow-path-race

Conversation

@paulcacheux
Copy link
Contributor

@paulcacheux paulcacheux commented Aug 14, 2025

When going from the fast read path to the slow write path, another thread may have already loaded the desired spec.

This can cause loading the kernel spec twice, but also issues like rebasing a decoder from a base to another with the same content (both kernel spec) but different addresses (the check is done here) which fails, preventing the loading of valid programs.

When going from the fast read path to the slow write path, another
thread may have already loaded the desired spec. This can cause loading
the kernel spec twice, but also issues like rebasing a decoder from a
base to another with the same content (both kernel spec) but different
addresses.

Signed-off-by: Paul Cacheux <[email protected]>
@paulcacheux paulcacheux marked this pull request as ready for review August 14, 2025 16:07
Copy link
Contributor

@lmb lmb left a comment

Choose a reason for hiding this comment

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

Thanks!

@lmb lmb merged commit a785455 into cilium:main Aug 15, 2025
18 checks passed
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.

2 participants