schedule(): hold runq lock for the entire duration of context switching
releasing the runq lock after loading page tables but before the actual context switch can leave execution in an inconsistent if the current process is descheduled from an IRQ between these two steps. this patch holds the runq lock with IRQs disabled and makes the context switch a single atomic operation.
This commit is contained in:
@ -206,6 +206,7 @@ x86_syscall:
|
||||
|
||||
.globl enter_user_mode
|
||||
enter_user_mode:
|
||||
callq release_runq_lock
|
||||
movq $0, %rdi
|
||||
movq %rsp, %rsi
|
||||
call check_signal
|
||||
|
||||
Reference in New Issue
Block a user