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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3A44C433F5 for ; Fri, 8 Apr 2022 06:28:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5BA5B6B0071; Fri, 8 Apr 2022 02:28:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 56A426B0072; Fri, 8 Apr 2022 02:28:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4586C6B0074; Fri, 8 Apr 2022 02:28:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0123.hostedemail.com [216.40.44.123]) by kanga.kvack.org (Postfix) with ESMTP id 38EB16B0071 for ; Fri, 8 Apr 2022 02:28:34 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E41A1AD6E3 for ; Fri, 8 Apr 2022 06:28:33 +0000 (UTC) X-FDA: 79332732906.25.A269AE4 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf01.hostedemail.com (Postfix) with ESMTP id 91B6540007 for ; Fri, 8 Apr 2022 06:28:32 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4KZSwv3b7gz1HBdw; Fri, 8 Apr 2022 14:27:59 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 8 Apr 2022 14:28:28 +0800 Subject: Re: [PATCH v7] mm/hwpoison: fix race between hugetlb free/demotion and memory_failure_hugetlb() To: =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggOWPoyDnm7TkuZ8p?= CC: Naoya Horiguchi , Andrew Morton , Mike Kravetz , Yang Shi , Dan Carpenter , "linux-kernel@vger.kernel.org" , Linux-MM References: <20220407112929.1344748-1-naoya.horiguchi@linux.dev> <4b5ad6c3-99a0-b04f-21ad-8ade46984c76@huawei.com> <20220408015610.GA3061012@hori.linux.bs1.fc.nec.co.jp> <20220408050753.GA3069452@hori.linux.bs1.fc.nec.co.jp> From: Miaohe Lin Message-ID: Date: Fri, 8 Apr 2022 14:28:27 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20220408050753.GA3069452@hori.linux.bs1.fc.nec.co.jp> Content-Type: text/plain; charset="utf-8" Content-Language: en-US X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Stat-Signature: mro8kfk6gq3d44ygrbwrrntyb3gw1ome Authentication-Results: imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 91B6540007 X-HE-Tag: 1649399312-123598 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2022/4/8 13:07, HORIGUCHI NAOYA(=E5=A0=80=E5=8F=A3 =E7=9B=B4=E4=B9=9F)= wrote: >=20 >>>> Without this patch, page refcnt is not decremented if MF_COUNT_INCRE= ASED is set in flags >>>> when PageHWPoison is already set. So I think this patch also fixes t= hat issue. Thanks! >>> >>> Good point, I even didn't notice that. And the issue still seems to e= xist >>> for normal page's cases. Maybe encountering "already hwpoisoned" cas= e from >>> madvise_inject_error() is rare but could happen when the first call f= ailed >>> to contain the error (which is still accessible from the calling proc= ess). >> >> Oh, I missed normal page's issue. :) Will you fix this issue kindly or= am I supposed >> to fix it? >=20 > I'll try it too, ;) >=20 That's very kind of you. ;) Thanks. > Thanks, > Naoya Horiguchi >=20