On Wed, 2022-07-27 at 20:24 +0100, Matthew Wilcox wrote: > On Wed, Jul 27, 2022 at 03:14:07PM -0400, Zack Rusin wrote: > > From: Zack Rusin <zackr@xxxxxxxxxx> > > > > Write page faults on last references might not have a valid page anymore. > > wp_page_reuse has always dealt with that scenario by making > > sure the page isn't null (or the reference was shared) before doing > > anything with it. Recently added checks in VM_BUG_ON (enabled by the > > CONFIG_DEBUG_VM option) use PageAnon helpers which assume the passed > > page is never null, before making sure there is a valid page to work > > with. > > > > Move the VM_BUG_ON, which unconditionally uses the page, after the > > code that checks that we have a valid one. > > Message-ID: <CAHk-=wh_TrgNm6vz7=7CgZppr0UrZ9TwLyb3dgPXyG-w=a8kJQ@xxxxxxxxxxxxxx> Ah, great, thanks. z