Commit a99e4e41 authored by Vernon Mauery's avatar Vernon Mauery Committed by Linus Torvalds
Browse files

[PATCH] pi-futex: fix mm_struct memory leak

lock_queue was getting called essentially twice in a row and was
continually incrementing the mm_count ref count, thus causing a memory

Dinakar Guniguntala provided a proper fix for the problem that simply grabs
the spinlock for the hash bucket queue rather than calling lock_queue.

The second time we do a queue_lock in futex_lock_pi, we really only need to
take the hash bucket lock.
Signed-off-by: default avatarDinakar Guniguntala <>
Signed-off-by: default avatarVernon Mauery <>
Acked-by: default avatarPaul E. McKenney <>
Signed-off-by: default avatarIngo Molnar <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 9262e914
......@@ -1208,7 +1208,7 @@ static int do_futex_lock_pi(u32 __user *uaddr, int detect, int trylock,
hb = queue_lock(&q, -1, NULL);
* Got the lock. We might not be the anticipated owner if we
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment