Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755085Ab0KPQn0 (ORCPT ); Tue, 16 Nov 2010 11:43:26 -0500 Received: from mga02.intel.com ([134.134.136.20]:58624 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754667Ab0KPQnZ (ORCPT ); Tue, 16 Nov 2010 11:43:25 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.59,206,1288594800"; d="scan'208";a="574347989" Message-ID: <4CE2B4AC.5080606@linux.intel.com> Date: Tue, 16 Nov 2010 08:43:24 -0800 From: Darren Hart User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Sergio Aguirre CC: LKML , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Namhyung Kim Subject: Re: [RFC][PATCH] futex: Hide false positive about uninit var usage References: <1289925157-17054-1-git-send-email-saaguirre@ti.com> In-Reply-To: <1289925157-17054-1-git-send-email-saaguirre@ti.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1811 Lines: 56 On 11/16/2010 08:32 AM, Sergio Aguirre wrote: > In exit_robust_list, there was this warning shown: > > kernel/futex.c: In function 'exit_robust_list': > kernel/futex.c:2492: warning: 'next_pi' may be used uninitialized in this function > > Which is a false positive, since in the function, the only scenario > possible in which the var is read, is after a successful excecution of > fetch_robust_entry, which populates the variable. > > So there's no real possibility of it being used uninitialized. Hi Sergio, You are correct. Thomas has recently pulled my fix for this into tip, it should be queued for mainline already. Thanks, Darren Hart > > Signed-off-by: Sergio Aguirre > Cc: Thomas Gleixner > Cc: Peter Zijlstra > Cc: Darren Hart > Cc: Ingo Molnar > Cc: Namhyung Kim > --- > kernel/futex.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/kernel/futex.c b/kernel/futex.c > index 6c683b3..3646157 100644 > --- a/kernel/futex.c > +++ b/kernel/futex.c > @@ -2489,7 +2489,8 @@ void exit_robust_list(struct task_struct *curr) > { > struct robust_list_head __user *head = curr->robust_list; > struct robust_list __user *entry, *next_entry, *pending; > - unsigned int limit = ROBUST_LIST_LIMIT, pi, next_pi, pip; > + unsigned int limit = ROBUST_LIST_LIMIT, pi; > + unsigned int uninitialized_var(next_pi), pip; > unsigned long futex_offset; > int rc; > -- Darren Hart Yocto Linux Kernel -- 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/