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]
Message-Id: <20190107150904.09e56f51acaf417ed21f13a3@linux-foundation.org>
Date:   Mon, 7 Jan 2019 15:09:04 -0800
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Hugh Dickins <hughd@...gle.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: Remove redundant test from find_get_pages_contig

On Mon, 7 Jan 2019 14:39:35 -0800 Matthew Wilcox <willy@...radead.org> wrote:

> On Mon, Jan 07, 2019 at 02:33:19PM -0800, Andrew Morton wrote:
> > On Mon,  7 Jan 2019 12:02:24 -0800 Matthew Wilcox <willy@...radead.org> wrote:
> > 
> > > After we establish a reference on the page, we check the pointer continues
> > > to be in the correct position in i_pages.  There's no need to check the
> > > page->mapping or page->index afterwards; if those can change after we've
> > > got the reference, they can change after we return the page to the caller.
> > 
> > But that isn't what the comment says.
> 
> Right.  That patch from Nick moved the check from before taking the
> ref to after taking the ref.  It was racy to have it before.  But it's
> unnecessary to have it afterwards -- pages can't move once there's a
> ref on them.  Or if they can move, they can move after the ref is taken.

So Nick's patch was never necessary?  I wonder what inspired it.

Would it be excessively cautious to put a WARN_ON_ONCE() in there for a
while?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ