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

[grpc/exec] Do not refinc on a nil parent #2620

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

tpapagian
Copy link
Member

@tpapagian tpapagian commented Jun 28, 2024

Thanks for contributing! Please ensure your pull request adheres to the following guidelines:

  • All commits contain a well written commit message and are signed-off (see Submitting a pull request).
  • All code is covered by unit and/or end-to-end tests where feasible.
  • All generated files are updated if needed (see Making changes).
  • Provide a title or release-note blurb suitable for the release notes (see guidelines).
  • Update documentation and write an upgrade note if needed (see guidelines).
  • Are you a user of Tetragon? Please add yourself to the Users doc in the Cilium repository.

When handling kthreads and we cannot find the parent, we print a warning, but we also call refinc on a nil parent which results in a panic in some cases.

This patch fixes that by avoiding the call of refinc in the case where we cannot find a kthread's parent.

Fixes: #2614

Do not increase the reference count when we cannot find a parent in kthreads.

When handling kthreads and we cannot find the parent, we print a
warning, but we also call refinc on a nil parent which results in a
panic in some cases.

This patch fixes that by avoiding the call of refinc in the case where
we cannot find a kthread's parent.

FIXES: #2614

Signed-off-by: Anastasios Papagiannis <[email protected]>
@tpapagian tpapagian added the release-note/bug This PR fixes an issue in a previous release of Tetragon. label Jun 28, 2024
@tpapagian tpapagian requested a review from a team as a code owner June 28, 2024 14:47
@tpapagian tpapagian requested a review from olsajiri June 28, 2024 14:47
@tpapagian tpapagian merged commit 6dcc3aa into main Jul 1, 2024
45 checks passed
@tpapagian tpapagian deleted the pr/apapag/fix-panic-kthread branch July 1, 2024 09:54
@kkourt
Copy link
Contributor

kkourt commented Jul 2, 2024

Should we backport this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/bug This PR fixes an issue in a previous release of Tetragon.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic: runtime error: invalid memory address or nil pointer dereference
3 participants