Skip to content

reboot system if OOM#6

Open
edvardxyz wants to merge 1 commit into
masterfrom
panic_oom
Open

reboot system if OOM#6
edvardxyz wants to merge 1 commit into
masterfrom
panic_oom

Conversation

@edvardxyz
Copy link
Copy Markdown
Contributor

safety check for buffer allocation failures in the csp_if_cblk_rx function.

Error handling improvements:

  • Added a check after calling csp_buffer_get to ensure that a valid buffer was allocated. If allocation fails, the code now calls csp_panic and enters an infinite loop to prevent undefined behavior.

csp_buffer_get_always is in private header

@edvardxyz edvardxyz requested a review from troelsjessen April 29, 2026 09:44
@troelsjessen
Copy link
Copy Markdown
Contributor

I suggest we keep this on a branch to be included in the STTC release, and request permission from CSP to use csp_get_buffer_always from L2 interfaces not defined internally in libcsp

@johandc
Copy link
Copy Markdown

johandc commented Apr 30, 2026

Yes. Buffer get always was designed for exactly this. If the uplink CBLK interface cannot allocate a CSP buffer, its best to flush everything by rebooting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants