-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
task/schedule: Split up create_user_task()
The create_user_task() function did the task creation and already put the new task on the global TASKLIST and the cpu run-queue. This is problematic because the task returned by create_user_task() is not ready to run yet. When the ELF loading fails and exec_user() returns an error, the task remains on the run-queue and TASKLIST. The next call to schedule() will then try to run it, which can cause undefined behavior in user-space. So split the function up and only add a new user task to the run-queue when it is fully initialized. Signed-off-by: Joerg Roedel <[email protected]>
- Loading branch information
1 parent
5cdac82
commit 3ba293f
Showing
3 changed files
with
35 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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