Skip to content

[release/2.1] Fix possible panic from WithMediaTypeKeyPrefix#13135

Merged
samuelkarp merged 1 commit intocontainerd:release/2.1from
k8s-infra-cherrypick-robot:cherry-pick-12508-to-release/2.1
Mar 27, 2026
Merged

[release/2.1] Fix possible panic from WithMediaTypeKeyPrefix#13135
samuelkarp merged 1 commit intocontainerd:release/2.1from
k8s-infra-cherrypick-robot:cherry-pick-12508-to-release/2.1

Conversation

@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

@k8s-infra-cherrypick-robot k8s-infra-cherrypick-robot commented Mar 27, 2026

This is an automated cherry-pick of #12508

/assign thaJeztah

Fix possible panic from WithMediaTypeKeyPrefix

As the same instance of a map is used in context and mutated
directly, this leads to a  situation where:
- Calling WithMediaTypeKeyPrefix from parallel goroutines where
  the context was based on the same base context can trigger a panic.
- A subcontext calling WithMediaTypeKeyPrefix changes the value for
  another context when they both originate from the same base context.

Signed-off-by: Tonis Tiigi <[email protected]>
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah
Copy link
Copy Markdown
Member

cc @kzys

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Mar 27, 2026
@samuelkarp samuelkarp merged commit 338b5dd into containerd:release/2.1 Mar 27, 2026
50 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Mar 27, 2026
@samuelkarp samuelkarp changed the title [release/2.1] remotes: fix possible panic from WithMediaTypeKeyPrefix [release/2.1] Fix possible panic from WithMediaTypeKeyPrefix Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants