[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1289925157-17054-1-git-send-email-saaguirre@ti.com>
Date: Tue, 16 Nov 2010 10:32:37 -0600
From: Sergio Aguirre <saaguirre@...com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Sergio Aguirre <saaguirre@...com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Darren Hart <dvhart@...ux.intel.com>,
Ingo Molnar <mingo@...e.hu>, Namhyung Kim <namhyung@...il.com>
Subject: [RFC][PATCH] futex: Hide false positive about uninit var usage
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.
Signed-off-by: Sergio Aguirre <saaguirre@...com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Darren Hart <dvhart@...ux.intel.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Namhyung Kim <namhyung@...il.com>
---
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;
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists