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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 26 Apr 2011 07:01:48 +0200
From:	Willy Tarreau <w@....eu>
To:	Hugh Dickins <hughd@...gle.com>
Cc:	linux-kernel@...r.kernel.org, stable@...nel.org,
	stable-review@...nel.org, Bob Liu <lliubbo@...il.com>,
	David Howells <dhowells@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Johannes Weiner <hannes@...xchg.org>,
	Enrik Berkhan <Enrik.Berkhan@...com>
Subject: Re: [PATCH 165/173] ramfs: fix memleak on no-mmu arch

On Mon, Apr 25, 2011 at 05:37:19PM -0700, Hugh Dickins wrote:
(...)
> >  fs/ramfs/file-nommu.c |    1 +
> >  1 file changed, 1 insertion(+)
> > 
> > --- a/fs/ramfs/file-nommu.c
> > +++ b/fs/ramfs/file-nommu.c
> > @@ -111,6 +111,7 @@ int ramfs_nommu_expand_for_mapping(struc
> >  		SetPageDirty(page);
> >  
> >  		unlock_page(page);
> > +		put_page(page);
> >  	}
> >  
> >  	return 0;
> 
> 
> I'm not absolutely certain, but I rather think this patch should NOT
> be included: I never looked to see when the bug it fixes crept in,
> but now I'm thinking it may have been 2678958e1225 "ramfs-nommu:
> use generic lru cache", which did not go in until 2.6.30 -
> __lru_cache_add adding the unbalanced page_cache_get.

OK.

> Whereas the "SetPageDirty" you can see above is not in 2.6.27.59-rc1:

Ah indeed you're right !

> I think you'd do well to include the patch below which introduced it.
> (It may give you a reject because __pagevec_lru_add was enhanced to
> __pagevec_lru_add_file by the time that patch went in.)
> 
> Yes, the pages Enrik reports as being wrongly discarded, would not
> have been discarded if their reference counts were too high:
> I do believe you need Enrik's patch instead of Bob's patch.

Fine, I will do that then.
Thank you Hugh for the detailed explanation !

Willy

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