projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d142e5
)
futex: Drop refcount if requeue_pi() acquired the rtmutex
author
Thomas Gleixner
<
[email protected]
>
Sat, 19 Dec 2015 20:07:38 +0000
(20:07 +0000)
committer
Thomas Gleixner
<
[email protected]
>
Sun, 20 Dec 2015 11:43:24 +0000
(12:43 +0100)
If the proxy lock in the requeue loop acquires the rtmutex for a
waiter then it acquired also refcount on the pi_state related to the
futex, but the waiter side does not drop the reference count.
Add the missing free_pi_state() call.
Signed-off-by: Thomas Gleixner <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Darren Hart <
[email protected]
>
Cc: Davidlohr Bueso <
[email protected]
>
Cc:
[email protected]
Cc: Andy Lowe <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Thomas Gleixner <
[email protected]
>
Cc:
[email protected]
kernel/futex.c
patch
|
blob
|
history
diff --git
a/kernel/futex.c
b/kernel/futex.c
index 684d7549825a4300ced2002a3fbec0a5698a18d1..24fbc7765828caca1652404bc55af116ae9b0c4b 100644
(file)
--- a/
kernel/futex.c
+++ b/
kernel/futex.c
@@
-2755,6
+2755,11
@@
static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
if (q.pi_state && (q.pi_state->owner != current)) {
spin_lock(q.lock_ptr);
ret = fixup_pi_state_owner(uaddr2, &q, current);
+ /*
+ * Drop the reference to the pi state which
+ * the requeue_pi() code acquired for us.
+ */
+ free_pi_state(q.pi_state);
spin_unlock(q.lock_ptr);
}
} else {