Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#7044 sched deadlock: Fix theoretical deadlocks (#7087)
Adds a check for the caller holding the previous input's lock before acquiring it to retrieve the previous workload. The existing code acquired the new lock without checking caller_holds_cur_input_lock, which could hang (it happened not to because the only caller who sets caller_holds_cur_input_lock to true set the current input to invalid and set_cur_input() returns prior to this point). Solves a 2nd theoretical lock issue: disallows the caller holding the input lock if we might call add_to_ready_queue() (we disallow the lock holding in dynamic mode in general to avoid this). Adds an assert. Issue: #7044
- Loading branch information