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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 C52C1C07E9D for ; Mon, 19 Jul 2021 11:25:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3A1B9610CC for ; Mon, 19 Jul 2021 11:25:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A1B9610CC 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 CA8AA8D00F4; Mon, 19 Jul 2021 07:25:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C58798D00EC; Mon, 19 Jul 2021 07:25:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF8D98D00F4; Mon, 19 Jul 2021 07:25:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0077.hostedemail.com [216.40.44.77]) by kanga.kvack.org (Postfix) with ESMTP id 8877D8D00EC for ; Mon, 19 Jul 2021 07:25:20 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2F53C20429 for ; Mon, 19 Jul 2021 11:25:19 +0000 (UTC) X-FDA: 78379106358.07.AD62297 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf13.hostedemail.com (Postfix) with ESMTP id 3E6C91008DE3 for ; Mon, 19 Jul 2021 11:25:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=8h+gj7zMndgQ4v2Max/ZsB0/KwqWBXcqOeZTsebwUqk=; b=gW/ia2amiUtk2+XkJaE5YxL0cz clPKSzMoF3fVNbFSKTYkVGVJPMIuN46DVHFZlG8fdHGaMbLJaFnHJwnt2tdgjSg6wHvocqC8NHC3d cpSEArsyy272WbCLLPVNlqxa2UY0/xG0OEzbirzpeeyjZRFMHcMe7pt6QG/9buJYx/R7OAZjOAATh v2gpydY18wkgPxhwl5AiKwSozqfsHnkl6xEd09VE0V+IUeEqiSuOua/Ez+vPEiY9t43wQALDKOxcx Nj3J5p9iAYnOziuHbqS1lYsvCj5G5kABcJj+uSKOLlEZA9IPWvZ6wXqAmx73yweSDhuq9gkwTH4oo vi3rB+cw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5RLl-006nhP-Aq; Mon, 19 Jul 2021 11:22:44 +0000 Date: Mon, 19 Jul 2021 12:22:17 +0100 From: Matthew Wilcox To: Miaohe Lin Cc: Boqun Feng , Zhouyi Zhou , paulmck@kernel.org, Oleksandr Natalenko , linux-kernel , stable@vger.kernel.org, Chris Clayton , Chris Rankin , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , rcu , Andrew Morton , Linux-MM , "Huang, Ying" , gregkh@linuxfoundation.org Subject: Re: linux-5.13.2: warning from kernel/rcu/tree_plugin.h:359 Message-ID: References: <2245518.LNIG0phfVR@natalenko.name> <6698965.kvI7vG0SvZ@natalenko.name> <20210718215914.GQ4397@paulmck-ThinkPad-P17-Gen-1> <20210719015313.GS4397@paulmck-ThinkPad-P17-Gen-1> <08803f78-3e99-6b3f-e809-5828fe47cf06@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <08803f78-3e99-6b3f-e809-5828fe47cf06@huawei.com> X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 3E6C91008DE3 X-Stat-Signature: xicfjoyk1seq3yrjgeumdpenht9qweko Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="gW/ia2am"; dmarc=none; spf=none (imf13.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-HE-Tag: 1626693918-305378 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, Jul 19, 2021 at 07:12:58PM +0800, Miaohe Lin wrote: > When in the commit 2799e77529c2a, we're using the percpu_ref to serialize against > concurrent swapoff, i.e. there's percpu_ref inside get_swap_device() instead of > rcu_read_lock(). Please see commit 63d8620ecf93 ("mm/swapfile: use percpu_ref to > serialize against concurrent swapoff") for detail. Oh, so this is a backport problem. 2799e77529c2 was backported without its prerequisite 63d8620ecf93. Greg, probably best to just drop 2799e77529c2 from all stable trees; the race described is not very important (swapoff vs reading a page back from that swap device).