From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6574C432C0 for ; Mon, 18 Nov 2019 12:25:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8526A206F4 for ; Mon, 18 Nov 2019 12:25:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="RRZjz+Kd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8526A206F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 36BDD6B026A; Mon, 18 Nov 2019 07:25:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2F6116B026B; Mon, 18 Nov 2019 07:25:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1E4466B026C; Mon, 18 Nov 2019 07:25:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0223.hostedemail.com [216.40.44.223]) by kanga.kvack.org (Postfix) with ESMTP id 07AE56B026A for ; Mon, 18 Nov 2019 07:25:39 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id B14268249980 for ; Mon, 18 Nov 2019 12:25:38 +0000 (UTC) X-FDA: 76169319156.08.stick55_888e7a8e5024f X-HE-Tag: stick55_888e7a8e5024f X-Filterd-Recvd-Size: 2505 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Mon, 18 Nov 2019 12:25:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uUSs4viGTBbjbx6wiZYFeukkdXhLp8bRYeI2Ixh2O/A=; b=RRZjz+KdkwledKvFzCWNMyeiC PXmeJXrf3apCA5pX00H7fJesiHDtNegRS6xkvtqsvHfgo6sh4VS/MsQWo3SDQFU80fZCZL6v0xIYI ytzjG8e0un8to8D4bCsrl3WXsm3Q5pDW9RHwZzKVpncbG4XHsZ0z26dWwyqndC+rn+BOZxjIzffeH ss8LXRGQOo+3o7v3IB22BxclFefM+ZyfUZ0oQU7xr79lGhANo9FEwu97CRD3VtS+iq/kNDRXRSUIL 0drAMLJoAXqsZo9O7gCinzTTUUiaIjpAJmo5RDsAQzkf8DUYeeRUeVLOGaaROdjYHqmk6qSNNGE5I h2yKAhzkA==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iWg64-0007uT-1J; Mon, 18 Nov 2019 12:25:36 +0000 Date: Mon, 18 Nov 2019 04:25:35 -0800 From: Matthew Wilcox To: zhong jiang Cc: sashal@kernel.org, gregkh@linuxfoundation.org, stable@vger.kernel.org, linux-mm@kvack.org, yangyingliang@huawei.com Subject: Re: [PATCH 4.9] memfd: Use radix_tree_deref_slot_protected to avoid the warning. Message-ID: <20191118122535.GK20752@bombadil.infradead.org> References: <20191118032610.182862-1-zhongjiang@huawei.com> <20191118032610.182862-4-zhongjiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191118032610.182862-4-zhongjiang@huawei.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Nov 18, 2019 at 11:26:10AM +0800, zhong jiang wrote: > The commit 3ce6b467b9b2 ("memfd: Fix locking when tagging pins") > introduces the following warning messages. > > *WARNING: suspicious RCU usage in memfd_wait_for_pins* > > It is because we still use radix_tree_deref_slot without read_rcu_lock. > We should use radix_tree_deref_slot_protected instead in the case. > > Cc: stable@vger.kernel.org > Fixes: 3ce6b467b9b2 ("memfd: Fix locking when tagging pins") > Signed-off-by: zhong jiang Reviewed-by: Matthew Wilcox (Oracle)