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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 17107C07E9B for ; Mon, 19 Jul 2021 11:24:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F3064610C7 for ; Mon, 19 Jul 2021 11:24:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236542AbhGSKnS (ORCPT ); Mon, 19 Jul 2021 06:43:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236491AbhGSKnO (ORCPT ); Mon, 19 Jul 2021 06:43:14 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7920CC061574; Mon, 19 Jul 2021 03:34:49 -0700 (PDT) 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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).