diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 2b275d034417..be228d61b738 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -449,7 +449,7 @@ _mtx_lock_sleep(struct mtx *m, uintptr_t tid, int opts, const char *file, int line) { #if defined(SMP) && !defined(NO_ADAPTIVE_MUTEXES) - struct thread *owner; + volatile struct thread *owner; #endif uintptr_t v; #ifdef KTR