-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
cpu/native: fix race in thread_yield_higher() [backport 2019.01] #10921
cpu/native: fix race in thread_yield_higher() [backport 2019.01] #10921
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK.
I don't believe this is a sensible ACK 😆 |
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? |
Famous last words ;-P |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clean backport ;)
Backport of #10891
Contribution description
Fixes #10881.
Testing procedure
See #10881 and #10908
Issues/PRs references
Fixes #10881.
Fixes #6123.