Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Fix shell freeze #145

Merged
merged 1 commit into from
Jan 5, 2024
Merged

Fix shell freeze #145

merged 1 commit into from
Jan 5, 2024

Conversation

krish2718
Copy link
Collaborator

No description provided.

wpa_supplicant/ctrl_iface_zephyr.c Outdated Show resolved Hide resolved
wpa_supplicant/ctrl_iface_zephyr.c Outdated Show resolved Hide resolved
fixup! [nrf noup] zephyr: Add support for WPA CLI zephyr

In case of low-memory conditions e.g., in stress tests, the allocation
failure causes the callback to skip recv, there by leaving data on the
socket and causing select to trigger the callback in an infinite loop.

This infinite loop causes threads starvation as WPA supplicant thread
runs at a higher priority, and is manifested as shell freeze.

Fix this by discarding the data on socket in case of memory allocation
failure.

Fixes SHEL-1967.

Signed-off-by: Chaitanya Tata <[email protected]>
@krish2718 krish2718 requested a review from jukkar January 5, 2024 10:48
@krish2718 krish2718 merged commit a6eb01d into nrfconnect:main Jan 5, 2024
1 check passed
@krish2718 krish2718 deleted the fix_shell_freeze branch January 5, 2024 12:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants