diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2020-05-19 15:50:37 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-01 14:18:01 +0300 |
commit | e431e923c8a6d65ff40f764f43edf7e2c3798316 (patch) | |
tree | c739c1c342ef453eaae982ed500460f02d763679 /fs/fuse | |
parent | 55c3e7fac92eb82c72b2713a565be09ac235a8a5 (diff) | |
download | linux-e431e923c8a6d65ff40f764f43edf7e2c3798316.tar.xz |
fuse: don't check refcount after stealing page
[ Upstream commit 32f98877c57bee6bc27f443a96f49678a2cd6a50 ]
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: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/dev.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 06dd38e76c62..f9022b702875 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -764,7 +764,6 @@ static int fuse_check_page(struct page *page) { if (page_mapcount(page) || page->mapping != NULL || - page_count(page) != 1 || (page->flags & PAGE_FLAGS_CHECK_AT_PREP & ~(1 << PG_locked | 1 << PG_referenced | |