Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2015-03-19 11:38:14 +0100
committerJiri Slaby <jslaby@suse.cz>2015-03-19 11:38:14 +0100
commit0c25ba1fb8f710e93eb5f49535b03ef0522a5f1d (patch)
tree96b110714ba19b7c5b46c271a1a34f38f1f3fd6c
parent869aad1c6ed10e43265ed8105b010b19f076fd8f (diff)
- mutex: Fix/document access-once assumption inrpm-3.0.101-53
mutex_can_spin_on_owner() (bnc#923099). - Refresh patches.fixes/0001-locking-mcs-Add-some-needed-ACCESS_ONCE-calls.patch. suse-commit: b63e425743eb3a356de0978623655a283be38622
-rw-r--r--kernel/mutex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/mutex.c b/kernel/mutex.c
index 5a94529d3e6e..f8841c659dc3 100644
--- a/kernel/mutex.c
+++ b/kernel/mutex.c
@@ -315,8 +315,8 @@ void osq_unlock(struct optimistic_spin_queue **lock)
*/
static inline int mutex_can_spin_on_owner(struct mutex *lock)
{
- int retval = 1;
struct task_struct *owner;
+ int retval = 1;
if (need_resched())
return 0;
@@ -324,7 +324,7 @@ static inline int mutex_can_spin_on_owner(struct mutex *lock)
rcu_read_lock();
owner = ACCESS_ONCE(lock->owner);
if (owner)
- retval = lock->owner->on_cpu;
+ retval = owner->on_cpu;
rcu_read_unlock();
/*
* if lock->owner is not set, the mutex owner may have just acquired