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

[nrf fromtree] native boards: IRQ handling: dont swap if kernel is uninitialized #1270

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

aescolar
Copy link
Contributor

@aescolar aescolar commented Aug 9, 2023

commit 7b43800
[nrf fromtree] native_posix: IRQ handling: dont swap if kernel is uninitialized

After an interrupt, do not attempt to swap
if the kernel is not yet initialized.

Otherwise, if an interrupt is raised with interrupts
unlocked while the kernel is not yet fully initialized,
a swap would lead to a crash.
(This could happen if a PREKERNEK1/2 driver enables interrupts
and an interrupt fires before the kernel has swapped to
main)

(cherry picked from commit dcd6ee518867de3d2ff02f5b9dea084feef17821)

commit 930c35e

[nrf fromtree] nrf52_bsim: IRQ handling: dont swap if kernel is uninitialized

After an interrupt, do not attempt to swap
if the kernel is not yet initialized.

Otherwise, if an interrupt is raised with interrupts
unlocked while the kernel is not yet fully initialized,
a swap would lead to a crash.
(This could happen if a PREKERNEK1/2 driver enables interrupts
and an interrupt fires before the kernel has swapped to
main)

(cherry picked from commit b6e32e441503e7bbc1b075a1e3d14efa3b0d2245)

…tialized

After an interrupt, do not attempt to swap
if the kernel is not yet initialized.

Otherwise, if an interrupt is raised with interrupts
unlocked while the kernel is not yet fully initialized,
a swap would lead to a crash.
(This could happen if a PREKERNEK1/2 driver enables interrupts
and an interrupt fires before the kernel has swapped to
main)

Signed-off-by: Alberto Escolar Piedras <[email protected]>
(cherry picked from commit b6e32e4)
…nitialized

After an interrupt, do not attempt to swap
if the kernel is not yet initialized.

Otherwise, if an interrupt is raised with interrupts
unlocked while the kernel is not yet fully initialized,
a swap would lead to a crash.
(This could happen if a PREKERNEK1/2 driver enables interrupts
and an interrupt fires before the kernel has swapped to
main)

Signed-off-by: Alberto Escolar Piedras <[email protected]>
(cherry picked from commit dcd6ee5)
@aescolar aescolar merged commit 0b2a4fd into nrfconnect:main Aug 10, 2023
12 checks passed
@aescolar aescolar deleted the native_swap branch August 10, 2023 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants