path: root/kernel/futex_compat.c
diff options
authorDarren Hart <>2010-11-04 15:00:00 -0400
committerThomas Gleixner <>2010-11-10 13:27:50 +0100
commit4c115e951d80aff126468adaec7a6c7854f61ab8 (patch)
tree9f808df3fe056c317d37b53d3640982c9bc593cc /kernel/futex_compat.c
parent814ce2521121c2459e16cea8c7221e157edbeddd (diff)
futex: Address compiler warnings in exit_robust_list
Since commit 1dcc41bb (futex: Change 3rd arg of fetch_robust_entry() to unsigned int*) some gcc versions decided to emit the following warning: kernel/futex.c: In function ‘exit_robust_list’: kernel/futex.c:2492: warning: ‘next_pi’ may be used uninitialized in this function The commit did not introduce the warning as gcc should have warned before that commit as well. It's just gcc being silly. The code path really can't result in next_pi being unitialized (or should not), but let's keep the build clean. Annotate next_pi as an uninitialized_var. [ tglx: Addressed the same issue in futex_compat.c and massaged the changelog ] Signed-off-by: Darren Hart <> Tested-by: Matt Fleming <> Tested-by: Uwe Kleine-König <> Cc: Peter Zijlstra <> Cc: Eric Dumazet <> Cc: John Kacur <> Cc: Ingo Molnar <> LKML-Reference: <> Signed-off-by: Thomas Gleixner <>
Diffstat (limited to 'kernel/futex_compat.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/futex_compat.c b/kernel/futex_compat.c
index 06da4dfc339b..a7934ac75e5b 100644
--- a/kernel/futex_compat.c
+++ b/kernel/futex_compat.c
@@ -49,7 +49,8 @@ void compat_exit_robust_list(struct task_struct *curr)
struct compat_robust_list_head __user *head = curr->compat_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, pip;
+ unsigned int uninitialized_var(next_pi);
compat_uptr_t uentry, next_uentry, upending;
compat_long_t futex_offset;
int rc;