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] [day] [month] [year] [list]
Date:	Mon, 5 Oct 2015 18:24:16 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Chen Gang <xili_gchen_5257@...mail.com>
Cc:	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>,
	"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>,
	Linux Memory <linux-mm@...ck.org>,
	kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/mmap.c: Remove redundant statement "error = -ENOMEM"

On 10/05, Chen Gang wrote:
>
> It is still a little better to remove it, although it should be skipped
> by "-O2".

Agreed, it can confuse the reader.

> Signed-off-by: Chen Gang <gang.chen.5i5j@...il.com>

Acked-by: Oleg Nesterov <oleg@...hat.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
> 
>  		 	   		  


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