public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix uninitialized warnings in mempolicy.c
@ 2004-09-10 22:20 Jesse Barnes
  2004-09-11  4:33 ` [PATCH] [ppc64] Remove -Wno-uninitialized Anton Blanchard
  0 siblings, 1 reply; 3+ messages in thread
From: Jesse Barnes @ 2004-09-10 22:20 UTC (permalink / raw)
  To: akpm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

Sorry if you already got these fixes, but err may be used uninitialized in 
mempolicy.c in both compat_set_mempolicy and compat_mbind.  This patch fixes 
that by setting them both to 0.

Signed-off-by: Jesse Barnes <jbarnes@sgi.com>

[-- Attachment #2: compat-mempolicy-warning-fixes.patch --]
[-- Type: text/plain, Size: 691 bytes --]

===== mm/mempolicy.c 1.14 vs edited =====
--- 1.14/mm/mempolicy.c	2004-09-07 23:32:56 -07:00
+++ edited/mm/mempolicy.c	2004-09-10 15:16:51 -07:00
@@ -557,7 +557,7 @@
 asmlinkage long compat_set_mempolicy(int mode, compat_ulong_t __user *nmask,
 				     compat_ulong_t maxnode)
 {
-	long err;
+	long err = 0;
 	unsigned long __user *nm = NULL;
 	unsigned long nr_bits, alloc_size;
 	DECLARE_BITMAP(bm, MAX_NUMNODES);
@@ -581,7 +581,7 @@
 			     compat_ulong_t mode, compat_ulong_t __user *nmask,
 			     compat_ulong_t maxnode, compat_ulong_t flags)
 {
-	long err;
+	long err = 0;
 	unsigned long __user *nm = NULL;
 	unsigned long nr_bits, alloc_size;
 	DECLARE_BITMAP(bm, MAX_NUMNODES);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] [ppc64] Remove -Wno-uninitialized
  2004-09-10 22:20 [PATCH] fix uninitialized warnings in mempolicy.c Jesse Barnes
@ 2004-09-11  4:33 ` Anton Blanchard
  2004-09-11  5:20   ` [PATCH] [ppc32] " Anton Blanchard
  0 siblings, 1 reply; 3+ messages in thread
From: Anton Blanchard @ 2004-09-11  4:33 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: paulus, akpm, linux-kernel


> Sorry if you already got these fixes, but err may be used uninitialized in 
> mempolicy.c in both compat_set_mempolicy and compat_mbind.  This patch fixes 
> that by setting them both to 0.

Thanks Jesse, I wonder why I missed this. Yuck, that would explain it.

Andrew: A follow up patch fixing a bunch of ppc64 warnings is on the way.

Anton

===== arch/ppc64/Makefile 1.47 vs edited =====
--- 1.47/arch/ppc64/Makefile	Mon Aug 23 06:24:25 2004
+++ edited/arch/ppc64/Makefile	Sat Sep 11 14:30:01 2004
@@ -26,8 +26,7 @@
 
 LDFLAGS		:= -m elf64ppc
 LDFLAGS_vmlinux	:= -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD)
-CFLAGS		+= -msoft-float -pipe -Wno-uninitialized -mminimal-toc \
-		   -mtraceback=none
+CFLAGS		+= -msoft-float -pipe -mminimal-toc -mtraceback=none
 
 ifeq ($(CONFIG_POWER4_ONLY),y)
 	CFLAGS += $(call cc-option,-mcpu=power4)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] [ppc32] Remove -Wno-uninitialized
  2004-09-11  4:33 ` [PATCH] [ppc64] Remove -Wno-uninitialized Anton Blanchard
@ 2004-09-11  5:20   ` Anton Blanchard
  0 siblings, 0 replies; 3+ messages in thread
From: Anton Blanchard @ 2004-09-11  5:20 UTC (permalink / raw)
  To: akpm; +Cc: paulus, linux-kernel

 
Remove -Wno-uninitialized on ppc32 too. Ive just found a number of
real bugs on ppc64 by doing the same.

Signed-off-by: Anton Blanchard <anton@samba.org>

===== arch/ppc/Makefile 1.63 vs edited =====
--- 1.63/arch/ppc/Makefile	Wed Sep  1 10:00:00 2004
+++ edited/arch/ppc/Makefile	Sat Sep 11 15:17:30 2004
@@ -24,7 +24,7 @@
 CPPFLAGS	+= -Iarch/$(ARCH)
 AFLAGS		+= -Iarch/$(ARCH)
 CFLAGS		+= -Iarch/$(ARCH) -msoft-float -pipe \
-		-ffixed-r2 -Wno-uninitialized -mmultiple
+		-ffixed-r2 -mmultiple
 CPP		= $(CC) -E $(CFLAGS)
 
 CHECKFLAGS	+= -D__powerpc__=1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-09-11  5:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-10 22:20 [PATCH] fix uninitialized warnings in mempolicy.c Jesse Barnes
2004-09-11  4:33 ` [PATCH] [ppc64] Remove -Wno-uninitialized Anton Blanchard
2004-09-11  5:20   ` [PATCH] [ppc32] " Anton Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox