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 6AB6DC07E9D for ; Mon, 19 Jul 2021 12:12:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5200C60200 for ; Mon, 19 Jul 2021 12:12:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236862AbhGSLbk (ORCPT ); Mon, 19 Jul 2021 07:31:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236781AbhGSLbj (ORCPT ); Mon, 19 Jul 2021 07:31:39 -0400 Received: from vulcan.natalenko.name (vulcan.natalenko.name [IPv6:2001:19f0:6c00:8846:5400:ff:fe0c:dfa0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21A50C061574; Mon, 19 Jul 2021 04:27:16 -0700 (PDT) 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 E3AA4B3F575; Mon, 19 Jul 2021 14:12:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=natalenko.name; s=dkim-20170712; t=1626696737; 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=qlJj4jq6CFTczdnKasdGAp0h/VuYGaTHb5oyVSK2n6A=; b=eknuVfSKTLtuDykfPZHOumpM3soNteCD60OWx+ITsiaCfqZy9bV/S1RDkzDqk8T/goRGOI TG9a7oBVoKe0w/ikIrQ1PzZf/mY3fibkDsEdPN9gJe9IgLMIKLlEOKk3SebfvFXJa23Q1J I31hxRvnVsuJ2FtZhFTQXUJdp03vQ1M= 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 14:12:15 +0200 Message-ID: <5812280.fcLxn8YiTP@natalenko.name> In-Reply-To: <688a2cb1-5cd8-2c00-889c-4d48021371f8@huawei.com> References: <2145858.R0O0FObHBN@natalenko.name> <688a2cb1-5cd8-2c00-889c-4d48021371f8@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: rcu@vger.kernel.org On pond=C4=9Bl=C3=AD 19. =C4=8Dervence 2021 14:08:37 CEST Miaohe Lin wrote: > On 2021/7/19 19:59, Oleksandr Natalenko wrote: > > On pond=C4=9Bl=C3=AD 19. =C4=8Dervence 2021 13:50:07 CEST Miaohe Lin wr= ote: > >> 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 > >>>> 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. > >>>=20 > >>> Oh, so this is a backport problem. 2799e77529c2 was backported witho= ut > >>> 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! > >=20 > > 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 loc= ked > > z3fold page > > ccb7848e2344 mm/z3fold: fix potential memory leak in z3fold_destroy_poo= l() > > 9f7229c901c1 mm/huge_memory.c: don't discard hugepage if other processes > > are mapping it > > f13259175e4f mm/huge_memory.c: add missing read-only THP checking in > > 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 > >=20 > > Do you suggest reverting "mm/shmem: fix shmem_swapin() race with swapof= f" > > as well? >=20 > This patch also rely on its prerequisite 63d8620ecf93. I think we should > either revert any commit in this series or just backport the entire serie= s. Then why not just pick up 2 more patches instead of dropping 2 patches. Gre= g,=20 could you please make sure the whole series from [1] gets pulled? Thanks. [1] https://lkml.kernel.org/r/20210426123316.806267-1-linmiaohe@huawei.com =2D-=20 Oleksandr Natalenko (post-factum)