From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752326AbbLRXIL (ORCPT ); Fri, 18 Dec 2015 18:08:11 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:53759 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752226AbbLRXIJ (ORCPT ); Fri, 18 Dec 2015 18:08:09 -0500 Date: Fri, 18 Dec 2015 15:08:03 -0800 From: Darren Hart To: Bhuvanesh_Surachari@mentor.com Cc: tglx@linutronix.de, 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, Andy Lowe Subject: Re: [PATCH] futex: Prevent pi_state from double freeing in case of error Message-ID: <20151218230803.GE15346@malice.jf.intel.com> References: <1450428223-7655-1-git-send-email-Bhuvanesh_Surachari@mentor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1450428223-7655-1-git-send-email-Bhuvanesh_Surachari@mentor.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 18, 2015 at 02:13:43PM +0530, Bhuvanesh_Surachari@mentor.com wrote: > From: Bhuvanesh Surachari > > 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 > Signed-off-by: Andy Lowe Apparently inadvertently introduced by: commit 30a6b8031fe14031ab27c1fa3483cb9780e7f63c futex: Fix a race condition between REQUEUE_PI and task death Reviewed-by: Darren Hart > --- > 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 > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > -- Darren Hart Intel Open Source Technology Center