diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 332f161d5f40..b46f4801f160 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -255,8 +255,10 @@ _kernel_lock(int nlocks) ipi_msg_t msg = { .func = kernel_lock_trace_ipi, }; + kpreempt_disable(); ipi_unicast(&msg, kernel_lock_holder); ipi_wait(&msg); + kpreempt_enable(); if (start_init_exec) _KERNEL_LOCK_ABORT("spinout"); }