Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3599816pxv; Mon, 19 Jul 2021 04:26:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwG/CK2r239qOwWsD8TksQjjc3/XHWvcUM/TmbRctlS1xBLxQVLh0SCNL56eRgGeUAkA14l X-Received: by 2002:a17:906:2642:: with SMTP id i2mr26953884ejc.323.1626693969021; Mon, 19 Jul 2021 04:26:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626693969; cv=none; d=google.com; s=arc-20160816; b=de3DgJK+K8PEn/1WqAg3b54VgUPqGH1KWWtstaqTm9mIGUmhP3PVxADKzryPnEX8Yb I47j2QCn88kbAw+QnyvyV+/OtLPa9MR2FNtpLYYN2zaeaSCTP9Rdxy/vX9BLC08W0rUB tHNYi1R/kheQLqi2S9OLfnTKLWTTwvAa1drWHlK536/Z22FBy09n2F/RlZTDotUTOdYX 8dFv1uMN5iFHVVZaluyekYJGpGkt+CaxsrDaz/u70VDNuPXD0859K7rWc6slXTm8N4ff 2atV2fTsk3dNu23UNiLyXQkmXmvmOBgEotqQafRwFRz7hNrtX/5V5BB3JKlXMm2MABHD Fafg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8h+gj7zMndgQ4v2Max/ZsB0/KwqWBXcqOeZTsebwUqk=; b=AEj197/5+aZCxYaFLdptrupm/7rd69+fNilTKomklLPKIOgr51oBmlO9FPPERRwoDn iNfMnPpFegS3VkvR9Psdpvj30MB8dKdjI7PJxKLmo64EDU6gUrtye+fyQeT7slIlOC5V uwLya9KNDlyFs5fyyKtuol3cxtHt5waX6Kj02At0Z/jqglNbdiQz/+Nvw0+lt3tXKKRf DI086rlVSH383qigco1hXkEXeNp8OnZuVHT631G79znc6KU4gYc8aLViXbvcJMwP0sCy ybxH9p4DggyoDCCnRMLdUlSouF1nTslpVgSpNXV6SnIGD8ZNAw4Q6WHjagI6f+nZmYE1 8JHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="gW/ia2am"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hp31si19665794ejc.73.2021.07.19.04.25.46; Mon, 19 Jul 2021 04:26:09 -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=@infradead.org header.s=casper.20170209 header.b="gW/ia2am"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236358AbhGSKnP (ORCPT + 99 others); Mon, 19 Jul 2021 06:43:15 -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).