Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3606056pxj; Tue, 15 Jun 2021 04:50:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxOIo35G1uLnoi9vPV6K4PHoZlquHKLrrcZaZzTSEduwv330s4PTzjByz/rmnyNAjR3SQr X-Received: by 2002:a05:6402:2694:: with SMTP id w20mr4068680edd.287.1623757835582; Tue, 15 Jun 2021 04:50:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623757835; cv=none; d=google.com; s=arc-20160816; b=rZqYoiVW46WHQs55r2Np9heaO1gF3p3zGpdYKU1oT9Eb9/Vx3smvNhHX1xawzyduw9 pYSym9fm8sCexrxAI1YYLeKd5uY1bZgDJhmskaqXrIcQclYAapKLYC9wNrpDPNrhUor9 mv7ykJ7eKBk5kxz6oziKrRwX6uqKBe+erUrMHa90s+xNHTy6ZO6J86Ow0nQ74MXYupTd TRfkF4k7xQMVp4qzTrtR2lA1XId7ZIn3nIogSYzYnrRbau0NP9buuJY0XOqjYX03QZet HGEVQ4P7QYUjSEWR5C9cBgdMnZtZZ4g7a75M+CRROCggF6kIpePmy1XZmjwSBCeaLbtU 0f8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=YY3/0ZIf2LjfYhmiGqQoGYCtHmMbG3058yGJv5xz6yg=; b=HpGMaemQfYhjz3jo5s9tQ0djm7izxlLXZvfseBAHkYF3OzBrss6eQGhuTq1o+P1lGT Ymj7Blhooev2OT34+/bBLE965u2W1sxb0gC30+535GtO1TQA6huRst2TBd2H52JdJsuc /bF+Jxfht1l285eJqyzt4qGYUkO0TvKeMdVD42VCFcrGxQlGWj5vNwUUYVo/bSuoeEz7 7w7rODP2xbWEoga8y7EwtCAWwzM3J8GoBW6gFMSWmkQKVVAc1gBffnZSPl8rGRbeUptj KlkHKKMhsHEKd4P3jBFHsonSSzDMa9EZPEbLdcbbGRvCBdXWMisFQ/onPx4QEwSPv4QC p9Gw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=sangfor.com.cn Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gg8si13867773ejc.230.2021.06.15.04.50.10; Tue, 15 Jun 2021 04:50:35 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=sangfor.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229947AbhFOLvO (ORCPT + 99 others); Tue, 15 Jun 2021 07:51:14 -0400 Received: from mail-m118208.qiye.163.com ([115.236.118.208]:65032 "EHLO mail-m118208.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229909AbhFOLvO (ORCPT ); Tue, 15 Jun 2021 07:51:14 -0400 X-Greylist: delayed 446 seconds by postgrey-1.27 at vger.kernel.org; Tue, 15 Jun 2021 07:51:14 EDT Received: from [0.0.0.0] (unknown [116.24.56.76]) by mail-m118208.qiye.163.com (Hmail) with ESMTPA id 2419AE00AB; Tue, 15 Jun 2021 19:41:39 +0800 (CST) Subject: Re: [PATCH v1 1/6] mm/hwpoison: mf_mutex for soft offline and unpoison To: Naoya Horiguchi , linux-mm@kvack.org Cc: Andrew Morton , David Hildenbrand , Oscar Salvador , Michal Hocko , Tony Luck , "Aneesh Kumar K.V" , Naoya Horiguchi , linux-kernel@vger.kernel.org References: <20210614021212.223326-1-nao.horiguchi@gmail.com> <20210614021212.223326-2-nao.horiguchi@gmail.com> From: Ding Hui Message-ID: Date: Tue, 15 Jun 2021 19:41:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210614021212.223326-2-nao.horiguchi@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZGh0YT1YYThgeTEJMTEMZT0NVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWUFZT0tIVUpKS0 hKTFVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Mz46ASo4SD8VFUhKSQwJDxo9 GkwaCxxVSlVKTUlITE5MSEtLSkxIVTMWGhIXVR8SFRwTDhI7CBoVHB0UCVUYFBZVGBVFWVdZEgtZ QVlKSk1VSU9VTk1VTE1ZV1kIAVlBSU9CQzcG X-HM-Tid: 0a7a0f7a20632c17kusn2419ae00ab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/6/14 10:12, Naoya Horiguchi wrote: > > @@ -2171,6 +2177,8 @@ int soft_offline_page(unsigned long pfn, int flags) > return -EIO; > } > > + mutex_lock(&mf_mutex); > + > if (PageHWPoison(page)) { > pr_info("%s: %#lx page already poisoned\n", __func__, pfn); > put_ref_page(ref_page); Did you miss mutex_unlock() here when page already poisoned ? > @@ -2194,5 +2202,7 @@ int soft_offline_page(unsigned long pfn, int flags) > __func__, pfn, page->flags, &page->flags); > } > > + mutex_unlock(&mf_mutex); > + > return ret; > } > -- Thanks, - Ding Hui