Commit 32f98877 authored by Miklos Szeredi's avatar Miklos Szeredi

fuse: don't check refcount after stealing page

page_count() is unstable.  Unless there has been an RCU grace period
between when the page was removed from the page cache and now, a
speculative reference may exist from the page cache.
Reported-by: default avatarMatthew Wilcox <willy@infradead.org>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent a5005c3c
...@@ -764,7 +764,6 @@ static int fuse_check_page(struct page *page) ...@@ -764,7 +764,6 @@ static int fuse_check_page(struct page *page)
{ {
if (page_mapcount(page) || if (page_mapcount(page) ||
page->mapping != NULL || page->mapping != NULL ||
page_count(page) != 1 ||
(page->flags & PAGE_FLAGS_CHECK_AT_PREP & (page->flags & PAGE_FLAGS_CHECK_AT_PREP &
~(1 << PG_locked | ~(1 << PG_locked |
1 << PG_referenced | 1 << PG_referenced |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment