All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] futex: Prevent pi_state from double freeing in case of error
@ 2015-12-18  8:43 Bhuvanesh_Surachari
  2015-12-18 14:55 ` Davidlohr Bueso
  2015-12-18 23:08 ` Darren Hart
  0 siblings, 2 replies; 8+ messages in thread
From: Bhuvanesh_Surachari @ 2015-12-18  8:43 UTC (permalink / raw)
  To: tglx
  Cc: peterz, mingo, dave, akpm, linux, viresh.kumar, luto, bigeasy,
	mtk.manpages, linux-kernel, Bhuvanesh Surachari,
	Bhuvanesh Surachari, Andy Lowe

From: Bhuvanesh Surachari <bhuvanesh_surachari@mentor.com>

In case of error from rt_mutex_start_proxy_lock pi_state is freed
twice in futex_requeue function. Hence removing free_pi_state in
else branch and branching to the location where pi_state is freed.

Signed-off-by: Bhuvanesh Surachari <Bhuvanesh_Surachari@mentor.com>
Signed-off-by: Andy Lowe <Andy_Lowe@mentor.com>
---
 kernel/futex.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/futex.c b/kernel/futex.c
index 684d754..264b3f2 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1815,7 +1815,6 @@ retry_private:
 			} else if (ret) {
 				/* -EDEADLK */
 				this->pi_state = NULL;
-				free_pi_state(pi_state);
 				goto out_unlock;
 			}
 		}
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-12-23 18:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-18  8:43 [PATCH] futex: Prevent pi_state from double freeing in case of error Bhuvanesh_Surachari
2015-12-18 14:55 ` Davidlohr Bueso
2015-12-19 18:24   ` Thomas Gleixner
2015-12-20  5:21     ` Darren Hart
2015-12-21 17:42       ` Davidlohr Bueso
2015-12-23 14:56     ` Bhuvanesh
2015-12-23 18:07       ` Thomas Gleixner
2015-12-18 23:08 ` Darren Hart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.