Skip to content

Comments

ringbuf: fix read after close panic#1859

Merged
dylandreimerink merged 1 commit intocilium:mainfrom
RonFed:ringbuf_read_after_close
Sep 1, 2025
Merged

ringbuf: fix read after close panic#1859
dylandreimerink merged 1 commit intocilium:mainfrom
RonFed:ringbuf_read_after_close

Conversation

@RonFed
Copy link
Contributor

@RonFed RonFed commented Aug 27, 2025

Fix the issue describe in #1857.
Following #1849, the Close function was changed to not set the ring to nil.
The panic happens when r.haveData is true, a Close happens and then another Read.
Added a test that reproduces the panic.

@RonFed RonFed requested a review from florianl as a code owner August 27, 2025 20:04
@RonFed RonFed force-pushed the ringbuf_read_after_close branch from 212c9a6 to b8a360e Compare August 27, 2025 20:06
@RonFed RonFed force-pushed the ringbuf_read_after_close branch from b8a360e to 55fdd1b Compare August 27, 2025 20:11
Copy link
Contributor

@florianl florianl left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix!

@dylandreimerink dylandreimerink merged commit 5031e28 into cilium:main Sep 1, 2025
31 of 33 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.

3 participants