From: <Bhuvanesh_Surachari@mentor.com>
To: <tglx@linutronix.de>
Cc: <peterz@infradead.org>, <mingo@kernel.org>, <dave@stgolabs.net>,
<akpm@linux-foundation.org>, <linux@rasmusvillemoes.dk>,
<viresh.kumar@linaro.org>, <luto@amacapital.net>,
<bigeasy@linutronix.de>, <mtk.manpages@gmail.com>,
<linux-kernel@vger.kernel.org>,
Bhuvanesh Surachari <bhuvanesh_surachari@mentor.com>,
Bhuvanesh Surachari <Bhuvanesh_Surachari@mentor.com>,
Andy Lowe <Andy_Lowe@mentor.com>
Subject: [PATCH] futex: Prevent pi_state from double freeing in case of error
Date: Fri, 18 Dec 2015 14:13:43 +0530 [thread overview]
Message-ID: <1450428223-7655-1-git-send-email-Bhuvanesh_Surachari@mentor.com> (raw)
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
next reply other threads:[~2015-12-18 8:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-18 8:43 Bhuvanesh_Surachari [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1450428223-7655-1-git-send-email-Bhuvanesh_Surachari@mentor.com \
--to=bhuvanesh_surachari@mentor.com \
--cc=Andy_Lowe@mentor.com \
--cc=akpm@linux-foundation.org \
--cc=bigeasy@linutronix.de \
--cc=dave@stgolabs.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®