Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3712428pxk; Tue, 29 Sep 2020 04:31:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwtXlwgad9VLYqSfrUBahET8IK5SbuFQ7dz1VaqyxNaZoEQfz5Vjnhb1SXMbiY2KY7AdJQ X-Received: by 2002:a17:906:8143:: with SMTP id z3mr3243186ejw.323.1601379088099; Tue, 29 Sep 2020 04:31:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601379088; cv=none; d=google.com; s=arc-20160816; b=vyylGO2pnWJnbtfdA4sUj/5g5bL0/yhQSZyNfryDrIsZgD8yxGMuL0Aq5pa2AGvF81 xG3/X2XDhmxpR8zx36coAUHHLVb7EiUPxHG5rrWinr3oyEzx/o0+2hMhxhdc0kw5IMxL h1ZOR4Op98z/uo8Ma7B7V+jrs3lcyCsjRYEu6ff5duku0iMbx79zE8sJuIJb3YAG7Ib/ fp6cLdvP76hm8t4cu8hhkyRnAypJsimHRsTbSb+vMmkN+zH8VbaAQyq7QJiI0BHFkh0T DRmvpDIbedY/Dh1HA3uy95ZQ0VQWgfrOIxL9nWP+Gza4i602oSiTl0O3XyQvc3Jjhx0F POkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=r6hkPWLrhghvEUwDg5s5ol3cyhBzGGf4sZ/pm6kLEsc=; b=MFrFNz5bOvADutA/e7QJvrLUJCF1tY+lyIcvBdLHnQu3JZSWlcvJpGQ5ov44G8ohEU WXG1S8fYpH2giFlrhiO47omueNOBY3I8WL+gx3077u/nX37+coO1rxaNVALMCUhFV6Gx KyU3DMlhluM81BHryRb8204MCM+UAetXPthrTSiMLAv+K/nccvJtjiXHow3OIaI7TeTW mmWEJe7z0EvxTgZXzch5GxILv5NORnydwNQxUX2uieVS2tVNw4JDTyK7liKEX7dMqKd6 NUHT4WRCLzovx5f5HcgUhs74QELa5CkoTRORblqzkshlElDRyiiVsoQVFzF3a+vqqqQl 86kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="LN/O5dlb"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si2570244ejx.205.2020.09.29.04.31.05; Tue, 29 Sep 2020 04:31:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="LN/O5dlb"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729638AbgI2L02 (ORCPT + 99 others); Tue, 29 Sep 2020 07:26:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:36424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729416AbgI2LTJ (ORCPT ); Tue, 29 Sep 2020 07:19:09 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BB35221D41; Tue, 29 Sep 2020 11:18:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601378285; bh=SdhpDMJTj3MzvxIvsNNng0DO6JHm/lXM7QhxSrmJ4Ls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LN/O5dlbrMRLvXbYV8uw/GrjiWgr4l4MxkWdVse4QLXbA4NnZW7oTP0zGjqm0P1wl FcAg3kyS31Bs7YZGpncpx29VXnPiN0IohEeTZHBVbsya59Jwe8zbPIGFPEqpsK5dmq XDEVdGgUG91qFSTWLM5osuaZdDx532dA6B/2yOgs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthew Wilcox , Miklos Szeredi , Sasha Levin Subject: [PATCH 4.14 119/166] fuse: dont check refcount after stealing page Date: Tue, 29 Sep 2020 13:00:31 +0200 Message-Id: <20200929105941.133738227@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929105935.184737111@linuxfoundation.org> References: <20200929105935.184737111@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miklos Szeredi [ 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 Signed-off-by: Miklos Szeredi Signed-off-by: Sasha Levin --- fs/fuse/dev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index f580695b7bb9a..1b9c4c19bed29 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 | -- 2.25.1