X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=kernel%2Flocking%2Fmutex-debug.h;h=57a871ae3c81a98e324b9ba907ef65f5c4f1cb8c;hb=37c1e28931333c4b838d1c8db5cdd8d75165dc6b;hp=d06ae3bb46c5f9f928cf7123464f49e284ab3ecf;hpb=94558e265b9539b2ecec98d037bae51c902663c1;p=cascardo%2Flinux.git diff --git a/kernel/locking/mutex-debug.h b/kernel/locking/mutex-debug.h index d06ae3bb46c5..57a871ae3c81 100644 --- a/kernel/locking/mutex-debug.h +++ b/kernel/locking/mutex-debug.h @@ -29,12 +29,12 @@ extern void debug_mutex_init(struct mutex *lock, const char *name, static inline void mutex_set_owner(struct mutex *lock) { - lock->owner = current; + WRITE_ONCE(lock->owner, current); } static inline void mutex_clear_owner(struct mutex *lock) { - lock->owner = NULL; + WRITE_ONCE(lock->owner, NULL); } #define spin_lock_mutex(lock, flags) \