From: Hugh Dickins <hughd@google.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-fsdevel@vger.kernel.org,
fuse-devel <fuse-devel@lists.sourceforge.net>,
linux-mm <linux-mm@kvack.org>, miklos <mszeredi@redhat.com>,
Gabriel Krisman Bertazi <krisman@collabora.com>,
Andre Almeida <andrealmeid@collabora.com>
Subject: Re: [fuse-devel] fuse: trying to steal weird page
Date: Sun, 3 May 2020 14:34:39 -0700 (PDT) [thread overview]
Message-ID: <alpine.LSU.2.11.2005031421230.4028@eggly.anvils> (raw)
In-Reply-To: <20200503102742.GF29705@bombadil.infradead.org>
On Sun, 3 May 2020, Matthew Wilcox wrote:
> On Sun, May 03, 2020 at 09:43:41AM +0100, Nikolaus Rath wrote:
> > Here's what I got:
> >
> > [ 221.277260] page:ffffec4bbd639880 refcount:1 mapcount:0 mapping:0000000000000000 index:0xd9
> > [ 221.277265] flags: 0x17ffffc0000097(locked|waiters|referenced|uptodate|lru)
> > [ 221.277269] raw: 0017ffffc0000097 ffffec4bbd62f048 ffffec4bbd619308 0000000000000000
> > [ 221.277271] raw: 00000000000000d9 0000000000000000 00000001ffffffff ffff9aec11beb000
> > [ 221.277272] page dumped because: fuse: trying to steal weird page
> > [ 221.277273] page->mem_cgroup:ffff9aec11beb000
>
> Great! Here's the condition:
>
> if (page_mapcount(page) ||
> page->mapping != NULL ||
> page_count(page) != 1 ||
> (page->flags & PAGE_FLAGS_CHECK_AT_PREP &
> ~(1 << PG_locked |
> 1 << PG_referenced |
> 1 << PG_uptodate |
> 1 << PG_lru |
> 1 << PG_active |
> 1 << PG_reclaim))) {
>
> mapcount is 0, mapping is NULL, refcount is 1, so that's all fine.
> flags has 'waiters' set, which is not in the allowed list. I don't
> know the internals of FUSE, so I don't know why that is.
That list of PG_flags dates back to 2010: which 2016's 62906027091f
("mm: add PageWaiters indicating tasks are waiting for a page bit")
ought to have updated. Though it's understandable that it did not:
surprising to find a list of PG_flags outside of mm/ and fs/proc/.
Just add PG_waiters to the list and the issue should go away.
>
> Also, page_count() is unstable.
Agreed: fine to back out if page_count() is high,
but not good to issue a worrying warning about it.
> Unless there has been an RCU grace period
> between when the page was freed and now, a speculative reference may exist
> from the page cache. So I would say this is a bad thing to check for.
>
> Thanks for the swift provision of the debugging data!
next prev parent reply other threads:[~2020-05-03 21:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-02 19:09 fuse: trying to steal weird page Nikolaus Rath
2020-05-02 19:52 ` Nikolaus Rath
2020-05-03 3:26 ` Matthew Wilcox
2020-05-03 8:43 ` [fuse-devel] " Nikolaus Rath
2020-05-03 10:27 ` Matthew Wilcox
2020-05-03 18:28 ` Gabriel Krisman Bertazi
2020-05-03 20:06 ` Matthew Wilcox
2020-05-03 20:25 ` Nikolaus Rath
2020-05-06 13:57 ` Vlastimil Babka
2020-05-03 21:34 ` Hugh Dickins [this message]
2020-05-18 12:45 ` Miklos Szeredi
2020-05-18 14:48 ` Matthew Wilcox
2020-05-18 14:58 ` Miklos Szeredi
2020-05-18 15:26 ` Matthew Wilcox
[not found] <87o998m0a7.fsf@vostro.rath.org>
[not found] ` <CAJfpegtQic0v+9G7ODXEzgUPAGOz+3Ay28uxqbafZGMJdqL-zQ@mail.gmail.com>
[not found] ` <87ef9omb5f.fsf@vostro.rath.org>
[not found] ` <CAJfpegu_qxcaQToDpSmcW_ncLb_mBX6f75RTEn6zbsihqcg=Rw@mail.gmail.com>
[not found] ` <87ef9nighv.fsf@thinkpad.rath.org>
[not found] ` <CAJfpegtiXDgSBWN8MRubpAdJFxy95X21nO_yycCZhpvKLVePRA@mail.gmail.com>
[not found] ` <87zhs7fbkg.fsf@thinkpad.rath.org>
[not found] ` <8736ovcn9q.fsf@vostro.rath.org>
[not found] ` <CAJfpegvjntcpwDYf3z_3Z1D5Aq=isB3ByP3_QSoG6zx-sxB84w@mail.gmail.com>
[not found] ` <877ee4vgr4.fsf@vostro.rath.org>
[not found] ` <878sy3h7gr.fsf@vostro.rath.org>
[not found] ` <CAJfpeguCJnGrzCtHREq9d5uV-=g9JBmrX_c===giZB7FxWCcgw@mail.gmail.com>
[not found] ` <CAJfpegu-QU-A0HORYjcrx3fM5FKGUop0x6k10A526ZV=p0CEuw@mail.gmail.com>
2019-02-26 20:35 ` Nikolaus Rath
2019-02-26 20:56 ` Miklos Szeredi
2019-03-01 20:40 ` Nikolaus Rath
2019-03-18 11:27 ` Miklos Szeredi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LSU.2.11.2005031421230.4028@eggly.anvils \
--to=hughd@google.com \
--cc=andrealmeid@collabora.com \
--cc=fuse-devel@lists.sourceforge.net \
--cc=krisman@collabora.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mszeredi@redhat.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox