aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/futex.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/futex.c')
-rw-r--r--kernel/futex.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index 6c91f938005d..15caf93e4a43 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -630,8 +630,10 @@ static int futex_wake(u32 __user *uaddr, int nr_wake)
630 630
631 list_for_each_entry_safe(this, next, head, list) { 631 list_for_each_entry_safe(this, next, head, list) {
632 if (match_futex (&this->key, &key)) { 632 if (match_futex (&this->key, &key)) {
633 if (this->pi_state) 633 if (this->pi_state) {
634 return -EINVAL; 634 ret = -EINVAL;
635 break;
636 }
635 wake_futex(this); 637 wake_futex(this);
636 if (++ret >= nr_wake) 638 if (++ret >= nr_wake)
637 break; 639 break;
@@ -1208,7 +1210,7 @@ static int do_futex_lock_pi(u32 __user *uaddr, int detect, int trylock,
1208 } 1210 }
1209 1211
1210 down_read(&curr->mm->mmap_sem); 1212 down_read(&curr->mm->mmap_sem);
1211 hb = queue_lock(&q, -1, NULL); 1213 spin_lock(q.lock_ptr);
1212 1214
1213 /* 1215 /*
1214 * Got the lock. We might not be the anticipated owner if we 1216 * Got the lock. We might not be the anticipated owner if we