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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 27 Apr 2012 10:22:18 +0400
From:	Cyrill Gorcunov <gorcunov@...nvz.org>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Kees Cook <keescook@...omium.org>
Subject: Re: linux-next: build warning after merge of the akpm tree

On Fri, Apr 27, 2012 at 03:44:20PM +1000, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build ()
> produced this warning:
> 
> kernel/sys.c: In function 'prctl_set_mm':
> kernel/sys.c:1779:6: warning: 'error' may be used uninitialized in this function [-Wuninitialized]
> 
> And this is not a false positive (I think).
> 
> Introduced by commit 5455a20be1a6 ("c/r: prctl: extend PR_SET_MM to set
> up more mm_struct entries").

Hi Stephen, thanks for report, have no idea how it happened, since
commit 5455a20be1a6 _has_ error = -EINVAL; line.
Anyway, here is a fix.

	Cyrill
---
From: Cyrill Gorcunov <gorcunov@...nvz.org>
Subject: [PATCH -mm] c/r: prctl: Add error initialization

Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Signed-off-by: Cyrill Gorcunov <gorcunov@...nvz.org>
CC: Andrew Morton <akpm@...ux-foundation.org>
CC: Kees Cook <keescook@...omium.org>
---
 kernel/sys.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6.git/kernel/sys.c
===================================================================
--- linux-2.6.git.orig/kernel/sys.c
+++ linux-2.6.git/kernel/sys.c
@@ -1790,6 +1790,8 @@ static int prctl_set_mm(int opt, unsigne
 	if (addr >= TASK_SIZE)
 		return -EINVAL;
 
+	error = -EINVAL;
+
 	down_read(&mm->mmap_sem);
 	vma = find_vma(mm, addr);
 
--
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