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>] [day] [month] [year] [list]
Message-ID: <COL130-W465CD26C1EF1D52CAD2FB4B9620@phx.gbl>
Date:	Tue, 25 Aug 2015 05:58:05 +0800
From:	Chen Gang <xili_gchen_5257@...mail.com>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Michal Hocko <mhocko@...nel.org>
CC:	"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
	"riel@...hat.com" <riel@...hat.com>,
	"sasha.levin@...cle.com" <sasha.levin@...cle.com>,
	"gang.chen.5i5j@...il.com" <gang.chen.5i5j@...il.com>,
	Linux Memory <linux-mm@...ck.org>,
	kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: mmap: Check all failures before set values

On 8/25/15 05:25, Andrew Morton wrote:
> On Mon, 24 Aug 2015 13:32:13 +0200 Michal Hocko <mhocko@...nel.org> wrote:
>
>> On Mon 24-08-15 00:59:39, gang.chen.5i5j@...com wrote:
>>> From: Chen Gang <gang.chen.5i5j@...il.com>
>>>
>>> When failure occurs and return, vma->vm_pgoff is already set, which is
>>> not a good idea.
>>
>> Why? The vma is not inserted anywhere and the failure path is supposed
>> to simply free the vma.
>
> Yes, it's pretty marginal but I suppose the code is a bit better with
> the patch than without. I did this:
>

OK, thanks. The comments really need to be improved, just like Michal
Hocko said before.


Thanks.
--
Chen Gang

Open, share, and attitude like air, water, and life which God blessed
 		 	   		  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ