diff options
| author | Ingo Molnar <mingo@kernel.org> | 2016-12-02 11:13:44 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2016-12-02 11:13:44 +0100 |
| commit | 1b95b1a06cb27badb3e53329fb56af2a2113fd80 (patch) | |
| tree | bbe52b10fde003833c980b0a30dd23b0e0855c87 /kernel/locking/rtmutex_common.h | |
| parent | x86/paravirt: Optimize native pv_lock_ops.vcpu_is_preempted() (diff) | |
| parent | locking/rtmutex: Use READ_ONCE() in rt_mutex_owner() (diff) | |
| download | linux-1b95b1a06cb27badb3e53329fb56af2a2113fd80.tar.gz linux-1b95b1a06cb27badb3e53329fb56af2a2113fd80.zip | |
Merge branch 'locking/urgent' into locking/core, to pick up dependent fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/locking/rtmutex_common.h')
| -rw-r--r-- | kernel/locking/rtmutex_common.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h index 4f5f83c7d2d3..e317e1cbb3eb 100644 --- a/kernel/locking/rtmutex_common.h +++ b/kernel/locking/rtmutex_common.h @@ -75,8 +75,9 @@ task_top_pi_waiter(struct task_struct *p) static inline struct task_struct *rt_mutex_owner(struct rt_mutex *lock) { - return (struct task_struct *) - ((unsigned long)lock->owner & ~RT_MUTEX_OWNER_MASKALL); + unsigned long owner = (unsigned long) READ_ONCE(lock->owner); + + return (struct task_struct *) (owner & ~RT_MUTEX_OWNER_MASKALL); } /* |
