Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3461758rwl; Sun, 2 Apr 2023 08:03:22 -0700 (PDT) X-Google-Smtp-Source: AKy350aIasdPg0tk3c1dmL0xL6s6wZDtmB6A0Ey3m1LIt60scQrf6YFuv66PDnrPnOp5UYp719gb X-Received: by 2002:a17:90b:1c8b:b0:234:d78:9b4c with SMTP id oo11-20020a17090b1c8b00b002340d789b4cmr36548861pjb.18.1680447802431; Sun, 02 Apr 2023 08:03:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680447802; cv=none; d=google.com; s=arc-20160816; b=xW0oANXNoeK1o77q+i/KK+frJEn6QrwBC9z2HcLj/jHDJu8ohX83D+17db+LpLQvJZ bJRgeaQlMmTxrG+cHLEK2PkuGaemtq2LVMfk/SWRbYY0iI1ag4eF9LVxPPjMKj5XpXn9 uyqWjuvOsS0zahAVzpRLg3cTTwWSf6yuhzkl7wAylQ6VEjR5KQs/FGuBofn3gEuVDgnw jD8Soaj7f0BdNjT7sjNq+Zj2uETu3sNCjsLIT3tRYyPjwejIDf2kL/gMeZxl8u1PAtzj Fop7dT2DgwglI+NYGwLoNsE23q8J67m3bB4ehzwfAdVAfSepr2lakroQyC45n37iyHZs Uj3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=qe4G8c8X43o0Y666LClyvgHV/0mZla6PG7zn+qRo31c=; b=0oR+moLkeAcmQZDCwzrcD3t5dbH+LtPb7VUaVVE8N7epD7EFCgzZVN5+YIJ8RCLoHc Z6qSRI+TqgFz8fKRoQyb3dwiqm/w2SM3+Rw2F+pyZzlFIg0pGCkXl1lBNcdcTs/N8Dii 7xAB3yYNuGGTAfrmz1/5yh8JXXn3uUjasm1ZAMTz1pQJjcCo5OJ/Ncpma8ykrztXhXnQ hy1dB2pyXd/njpM2zqmKK8tjZC8orynId3pJi/dd3+Lx8DM9bOoDmXcpcbGVu7EuajOx 2cA8cfboFDBauJzv9fAZ/cvhZkNPtJXzzM0yNtVv3N9qzbRwLl0ZJx44TfrWiFynaFIe ElJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mg17-20020a17090b371100b0023def94be71si6512909pjb.162.2023.04.02.08.03.09; Sun, 02 Apr 2023 08:03:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230437AbjDBO4f (ORCPT + 99 others); Sun, 2 Apr 2023 10:56:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229565AbjDBO4e (ORCPT ); Sun, 2 Apr 2023 10:56:34 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E284D6A7A; Sun, 2 Apr 2023 07:56:32 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=rongwei.wang@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0Vf8O9Kq_1680447388; Received: from 192.168.31.179(mailfrom:rongwei.wang@linux.alibaba.com fp:SMTPD_---0Vf8O9Kq_1680447388) by smtp.aliyun-inc.com; Sun, 02 Apr 2023 22:56:29 +0800 Message-ID: <3cb9b024-d124-b13d-a80e-f5788b023065@linux.alibaba.com> Date: Sun, 2 Apr 2023 22:56:27 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mm/swap: fix swap_info_struct race between swapoff and get_swap_pages() To: Bagas Sanjaya , akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-stable@vger.kernel.org References: <20230401221920.57986-1-rongwei.wang@linux.alibaba.com> Content-Language: en-US From: Rongwei Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.0 required=5.0 tests=ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/2/23 9:37 PM, Bagas Sanjaya wrote: > On Sun, Apr 02, 2023 at 06:19:20AM +0800, Rongwei Wang wrote: >> Without this modification, a core will wait (mostly) > "Currently, a core will ..." > >> But, a worse consequence, panic also can be caused by > "However, in the worst case, ..." > >> In this patch, we lock p->lock before calling > "Lock p->lock before calling ..." > >> We also find this problem exists in stable 5.10. > So, you claim that 5.15.y and 6.1.y aren't affected, right? I think above both versions also be affected. I can check they next. > > Also, Cc: stable@vger.kernel.org on the SoB area (as pointed by kernel > test robot [1]. Thanks, next version will to do. > > Thanks. > > [1]: https://lore.kernel.org/stable/ZCiuGEkyk%2F1Afisk@ec83ac1404bb/ >