lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1288216466-14309-2-git-send-email-dvhart@linux.intel.com>
Date:	Wed, 27 Oct 2010 14:54:24 -0700
From:	Darren Hart <dvhart@...ux.intel.com>
To:	linux-kernel@...r.kernel.org
Cc:	Matt Fleming <matt@...sole-pimps.org>, tglx@...utronix.de,
	peterz@...radead.org, mingo@...e.hu, eric.dumazet@...il.com,
	jkacur@...hat.com, Darren Hart <dvhart@...ux.intel.com>
Subject: [PATCH 1/3] futex: fix compiler warnings in exit_robust_list

The following commit introduced a compiler warning:

Commit 1dcc41bb037533839753df983d31778b30b67d93
futex: Change 3rd arg of fetch_robust_entry() to unsigned int*

The following archs/compiler versions all report:
kernel/futex.c: In function ‘exit_robust_list’:
kernel/futex.c:2492: warning: ‘next_pi’ may be used uninitialized in this function

x86_64
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
gcc (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10)
gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5

sh
sh-linux-gnu-gcc (Sourcery G++ Lite 4.3-143) 4.3.3

The code path really can't result in next_pi pi being unitialized (or should
not), but let's keep the build clean. Assign next_pi = 0 to avoid the warnings.

Signed-off-by: Darren Hart <dvhart@...ux.intel.com>
Tested-by: Matt Fleming <matt@...sole-pimps.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...e.hu>
CC: Eric Dumazet <eric.dumazet@...il.com>
CC: John Kacur <jkacur@...hat.com>
---
 kernel/futex.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/futex.c b/kernel/futex.c
index a118bf1..78715cb 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2489,7 +2489,7 @@ 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, next_pi = 0, pip;
 	unsigned long futex_offset;
 	int rc;
 
-- 
1.7.1

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ