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,URIBL_BLOCKED,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 0AC1BC432C0 for ; Mon, 18 Nov 2019 12:25:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BABD3206F4 for ; Mon, 18 Nov 2019 12:25:25 +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="ZzFz2m7M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BABD3206F4 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 6C7536B0269; Mon, 18 Nov 2019 07:25:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6777C6B026A; Mon, 18 Nov 2019 07:25:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B7026B026B; Mon, 18 Nov 2019 07:25:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0197.hostedemail.com [216.40.44.197]) by kanga.kvack.org (Postfix) with ESMTP id 49B4E6B0269 for ; Mon, 18 Nov 2019 07:25:25 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 000DB180AD80F for ; Mon, 18 Nov 2019 12:25:24 +0000 (UTC) X-FDA: 76169318610.20.love49_868b8ff997b06 X-HE-Tag: love49_868b8ff997b06 X-Filterd-Recvd-Size: 2505 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Mon, 18 Nov 2019 12:25:24 +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=TJ2JeIO6Q3wjCCUTgGmLHim7HC98v5OYR1iIlbW1p14=; b=ZzFz2m7MAuo9T+24GOitYZtp2 chZu+oYG+oZPpt7HrBjPl6R1fKUBO4QSGcv5O/aF2+i+ODy31VJfbEr7IXhJQqTQd6iWk29oTEwII yj31EGSIIt6lhiPbZShgrqLvBfDYq2/RvUAw6gBtORldw3xAkICjjnE5cfFVXVyF2pS5qBWNGu+tT WtFUpji8RGWyQi3yg2QfLZoyFCfgzBw4k64OgbobXkUqohrqPA949Y6EIPbZc/lFmS9gtEq68gFCB TEjiryTBcoJ2P5giT2H3Ig4nr2ePC3acduMLKDeDO72Z1e2MKb2sBnDNzJ0qBL1LTACbPGBmoaeN9 ycSYbcuYg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iWg5q-0007ta-2u; Mon, 18 Nov 2019 12:25:22 +0000 Date: Mon, 18 Nov 2019 04:25:22 -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.4] memfd: Use radix_tree_deref_slot_protected to avoid the warning. Message-ID: <20191118122522.GJ20752@bombadil.infradead.org> References: <20191118032610.182862-1-zhongjiang@huawei.com> <20191118032610.182862-3-zhongjiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191118032610.182862-3-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:09AM +0800, zhong jiang wrote: > The commit eb4058d8daf8 ("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: eb4058d8daf8 ("memfd: Fix locking when tagging pins") > Signed-off-by: zhong jiang Reviewed-by: Matthew Wilcox (Oracle)