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-next>] [day] [month] [year] [list]
Date:	Mon, 5 Oct 2015 23:55:35 +0800
From:	Chen Gang <xili_gchen_5257@...mail.com>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
	"riel@...hat.com" <riel@...hat.com>, Michal Hocko <mhocko@...e.cz>,
	"oleg@...hat.com" <oleg@...hat.com>,
	"emunson@...mai.com" <emunson@...mai.com>,
	"sasha.levin@...cle.com" <sasha.levin@...cle.com>,
	"pfeiner@...gle.com" <pfeiner@...gle.com>,
	"aarcange@...hat.com" <aarcange@...hat.com>,
	"vishnu.ps@...sung.com" <vishnu.ps@...sung.com>
CC:	Linux Memory <linux-mm@...ck.org>,
	kernel mailing list <linux-kernel@...r.kernel.org>
Subject: [PATCH] mm/mmap.c: Remove redundant statement "error = -ENOMEM"

>From 4150fd59c4aa35d36e81920ecb2a522c8c7b68b9 Mon Sep 17 00:00:00 2001
From: Chen Gang <gang.chen.5i5j@...il.com>
Date: Mon, 5 Oct 2015 23:43:30 +0800
Subject: [PATCH] mm/mmap.c: Remove redundant statement "error = -ENOMEM"

It is still a little better to remove it, although it should be skipped
by "-O2".

Signed-off-by: Chen Gang <gang.chen.5i5j@...il.com>
---
 mm/mmap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index 8393580..1da4600 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1562,7 +1562,6 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
 	}
 
 	/* Clear old maps */
-	error = -ENOMEM;
 	while (find_vma_links(mm, addr, addr + len, &prev, &rb_link,
 			      &rb_parent)) {
 		if (do_munmap(mm, addr, len))
-- 
1.9.3

 		 	   		  
Download attachment "0001-mm-mmap.c-Remove-redundant-statement-error-ENOMEM.patch" of type "application/octet-stream" (777 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ