summaryrefslogtreecommitdiff
path: root/fs/fuse
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2020-05-19 15:50:37 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-01 14:12:44 +0300
commitfc8f9b9fd1dfe1f8d04967ee751806c56cce6310 (patch)
treef70b7016a3b1159fc258f8589e336147d95d4992 /fs/fuse
parentac9867f43981c652fadd662e93b529718d1ab1e5 (diff)
downloadlinux-fc8f9b9fd1dfe1f8d04967ee751806c56cce6310.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.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index f580695b7bb9..1b9c4c19bed2 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -824,7 +824,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 |