Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3623110pxv; Mon, 19 Jul 2021 05:00:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyp7yf+HP32bmv93pEX+9JMyLoQYgqlb5yAh1sYfV0lYOqo0/S0wBUAo/PRmOn0qZ40nFut X-Received: by 2002:a92:de0a:: with SMTP id x10mr16814350ilm.215.1626696033088; Mon, 19 Jul 2021 05:00:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626696033; cv=none; d=google.com; s=arc-20160816; b=Dzig90+oXYYKW0ZUSKWnOXLPZOZUIYgtvusM1B4nc+qNXqU9z8PrvkRNa300Gvkn8F hxwbAYMimZ8Y8GYKjblgzX6CQorIZ+0pCRex+hbzG249IWH7wIQbWkUKxfr6IDq8Dq/b EvfVSKXuxqgv3So/vnfYoh9DKl7RKKtlhs8LfmxQGVKj8qsIB/tKzTr/Nfo2p+aBQOW1 GEZprx637jxwpieVaHEmL3u8UuLWtKuTv7I1MFKB5/vY5VWpFHXJOlQvVfDxt+Lru6Nl KsZjXrtJAG3FgRv1i4D/p8SNpMHcd6gSgJem80iUlUi1KTWFpXBs2RRYTXH5isNenWau 3fKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lEKGRenaAPW2gmTFyg57lWPQrt1Vqj2PhxfMAnpoKJU=; b=K6/jyiJFTB9yq0yDGn2LGewOwVxNgS6NxB6YYWsyFVlrTGrvZZ+UPZnNmY/AVY6Kh+ dcQ80sG5nStRf7wu11NGqBsp9INoHaEunlhh1wgkI2e3qY8trEqa9awIRF1m4L+9l5c+ mQYWp/MQ0UEUEO5qk2Kyd0yf5WnVlAk6gg/dl+fg1oX4CmFFKKOFLXgrRY+2Dk+UtZ4N lbkB/O9JpzEVOxn7w5sr1mJUdvgHY8K1riRjHQZuMli5aiZ8O6NHTMmrEVbmwphw1UA0 vjMY9GyOdCuSGoUnzoB5memOxfUj0N1PidGciYJmvOdM/Ac+bWIMJQukuVVvI/3YrEoy sjVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@natalenko.name header.s=dkim-20170712 header.b=d7hajsSl; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=natalenko.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x9si19402173jat.100.2021.07.19.05.00.21; Mon, 19 Jul 2021 05:00:33 -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=@natalenko.name header.s=dkim-20170712 header.b=d7hajsSl; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=natalenko.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236402AbhGSLSo (ORCPT + 99 others); Mon, 19 Jul 2021 07:18:44 -0400 Received: from vulcan.natalenko.name ([104.207.131.136]:55666 "EHLO vulcan.natalenko.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230493AbhGSLSo (ORCPT ); Mon, 19 Jul 2021 07:18:44 -0400 Received: from spock.localnet (unknown [151.237.229.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vulcan.natalenko.name (Postfix) with ESMTPSA id 29CEDB3F506; Mon, 19 Jul 2021 13:59:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=natalenko.name; s=dkim-20170712; t=1626695962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lEKGRenaAPW2gmTFyg57lWPQrt1Vqj2PhxfMAnpoKJU=; b=d7hajsSlNaqrqEWRUG0Ghtkzz+3EOXNYXRxp/oeBEBA+eE99YxWxRpSFDd4jBWG4X6y06I ADrN3O1atnVXbEsIvtzpvg53MakH1UoQjdWBG4LqW5mE+IqKMSz61I1C9XUMMHYeYKgMb3 XFYR7z+zaMV7h2ycTcjo3GdgR1bin+0= From: Oleksandr Natalenko To: Matthew Wilcox , Miaohe Lin Cc: Boqun Feng , Zhouyi Zhou , paulmck@kernel.org, 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 Date: Mon, 19 Jul 2021 13:59:20 +0200 Message-ID: <2145858.R0O0FObHBN@natalenko.name> In-Reply-To: <8058e175-cec5-c243-6499-c1cd4e3c8605@huawei.com> References: <8058e175-cec5-c243-6499-c1cd4e3c8605@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On pond=C4=9Bl=C3=AD 19. =C4=8Dervence 2021 13:50:07 CEST Miaohe Lin wrote: > On 2021/7/19 19:22, Matthew Wilcox wrote: > > 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 serial= ize > >> 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. > >=20 > > Oh, so this is a backport problem. 2799e77529c2 was backported without > > its prerequisite 63d8620ecf93. Greg, probably best to just drop >=20 > Yes, they're posted as a patch set: >=20 > https://lkml.kernel.org/r/20210426123316.806267-1-linmiaohe@huawei.com >=20 > > 2799e77529c2 from all stable trees; the race described is not very > > important (swapoff vs reading a page back from that swap device). > > . >=20 > The swapoff races with reading a page back from that swap device should be > really uncommon as most users only do swapoff when the system is going to > shutdown. >=20 > Sorry for the trouble! git log --oneline v5.13..v5.13.3 --author=3D"Miaohe Lin" 11ebc09e50dc mm/zswap.c: fix two bugs in zswap_writeback_entry() 95d192da198d mm/z3fold: use release_z3fold_page_locked() to release locked= =20 z3fold page ccb7848e2344 mm/z3fold: fix potential memory leak in z3fold_destroy_pool() 9f7229c901c1 mm/huge_memory.c: don't discard hugepage if other processes ar= e=20 mapping it f13259175e4f mm/huge_memory.c: add missing read-only THP checking in=20 transparent_hugepage_enabled() afafd371e7de mm/huge_memory.c: remove dedicated macro HPAGE_CACHE_INDEX_MASK a533a21b692f mm/shmem: fix shmem_swapin() race with swapoff c3b39134bbd0 swap: fix do_swap_page() race with swapoff Do you suggest reverting "mm/shmem: fix shmem_swapin() race with swapoff" a= s=20 well? =2D-=20 Oleksandr Natalenko (post-factum)