[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <720579.1719268838@warthog.procyon.org.uk>
Date: Mon, 24 Jun 2024 23:40:38 +0100
From: David Howells <dhowells@...hat.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: dhowells@...hat.com, Christian Brauner <christian@...uner.io>,
Jeff Layton <jlayton@...nel.org>, netfs@...ts.linux.dev,
v9fs@...ts.linux.dev, linux-afs@...ts.infradead.org,
linux-cifs@...r.kernel.org, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] netfs: Fix netfs_page_mkwrite() to check folio->mapping is valid
Matthew Wilcox <willy@...radead.org> wrote:
> > if (folio_lock_killable(folio) < 0)
> > goto out;
> > + if (folio->mapping != mapping) {
> > + ret = VM_FAULT_NOPAGE | VM_FAULT_LOCKED;
> > + goto out;
> > + }
>
> Have you tested this?
I've tried to. generic/247 can trigger it, but the race happens rarely.
> I'd expect it to throw some VM assertions.
I didn't see any.
I guess VM_FAULT_LOCKED is not universally handled by the caller and that I
should unlock the folio myself instead.
David
Powered by blists - more mailing lists