cpu/native: fix race in thread_yield_higher() [backport 2019.01]#10921
Merged
emmanuelsearch merged 2 commits intoFeb 1, 2019
Merged
Conversation
Error case: 1. thread_yield_higher() stores the thread's ucontext 2. creates an "isr ucontext" for isr_thread_yield, switches to it Case 1: no signals are pending, continues in isr_thread_yield() 3a. sched_run is called 4a. return to sched_active_thread ucontext Case 2: signals pending (the crashing scenario), continues in native_irq_handler() 3b. handles signals 4b. if sched_context_switch_request is set, call sched_run 5b. return to sched_active_thread ucontext 4b misses the call to sched_run(), leading to a possible return into a non-ready thread. (cherry picked from commit 62bb4cc)
(cherry picked from commit 82b2362)
Member
Author
|
I don't believe this is a sensible ACK 😆 |
Contributor
Not all ACKs are created equal? 😉 Seriously, the code it touches hasn't been changed in a long while. The change is as valid as in master. If it compiles and finishes the CI-tests, what could possibly go wrong? |
Member
Author
Famous last words ;-P |
Member
Author
|
But on a more somber note: I prefer if a person that is not us two would have a look before we merge this into the stable branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #10891
Contribution description
Fixes #10881.
Testing procedure
See #10881 and #10908
Issues/PRs references
Fixes #10881.
Fixes #6123.