Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1807596pxb; Thu, 4 Mar 2021 23:27:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxTSvPWkOZBWLCF5HIli0T+G02pcK6KyQPrf7WoShFeedqzdB1r5sarDgCjjPkp3Ux5qlNH X-Received: by 2002:a02:9985:: with SMTP id a5mr8457989jal.122.1614929251047; Thu, 04 Mar 2021 23:27:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614929251; cv=none; d=google.com; s=arc-20160816; b=tra5x1K/VP10D+o9ar+M1Zh2Zb65BmDxH/O6S2cXEVcTUB3fIFnSWq3OCKEDAjQaXI TAdpFVxJt9ZTRgeCtFB73gFzOhstEiekuM5fBNNDrNG34YhehKwjGkckU0NA4hVEojOh sJc9+aMxjqc8aP2LbpPuPe73AVjHvy6rekuvY2sxgdg0yCNNhDakeP26C1zfoV1367mI zY7a2oSkOyMmqeXASSAHp8H9O+xfxlTbznBUHy6QGprSc6af/4WiskCso9c9d8SDLLID RVdVlZIx9amrzKIOutcgWamkUIZfDJiky0Z7c4iqysKvizkN275lWkCIDJ6sxgzug5Pj kM3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=hDKUJeCuu/+YxxOZUaVXbIQXU3lrp4y40lxLTb7Wqjw=; b=YHbhYb2te0Im9fwPxrrDh6Gx7C6oC4VZ2EnxBkh8ssATZQKodivgkWQCTh/odZd6Sg FTMOgk9cAEK7xjgr+ngBVkGG9i0kSWAvVaXRzNxERlT3KJFN55Gz/gy4yA8zL7wbGc/f sh4N6ydg+ROCaBO02ycvp1ek3riGsmz6nK4maNXhYS6JaLVV2/bXYEuWAeRpb4eSyW5l +8aO6pc7KNIMmJnjxHNPcBFWXRsQN2HAZ5FBSA2vFG/sLTllr95nTuKx/B/DUD6+Uubm 6Ii55/CI41yZrLPAxVY+Q8L8L0jNVQ0+xjqTxTydj1WIwVhEUITqz3nm2Hg9HQTOpBGi 4Biw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v6si2117034jas.90.2021.03.04.23.27.17; Thu, 04 Mar 2021 23:27:31 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229469AbhCEH1D (ORCPT + 99 others); Fri, 5 Mar 2021 02:27:03 -0500 Received: from mx2.suse.de ([195.135.220.15]:39914 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbhCEH1C (ORCPT ); Fri, 5 Mar 2021 02:27:02 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9CDB4AF10; Fri, 5 Mar 2021 07:27:01 +0000 (UTC) Date: Fri, 5 Mar 2021 08:26:58 +0100 From: Oscar Salvador To: Naoya Horiguchi Cc: linux-mm@kvack.org, Andrew Morton , Michal Hocko , Tony Luck , "Aneesh Kumar K.V" , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] mm, hwpoison: do not lock page again when me_huge_page() successfully recovers Message-ID: <20210305072652.GA18868@linux> References: <20210304064437.962442-1-nao.horiguchi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210304064437.962442-1-nao.horiguchi@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 04, 2021 at 03:44:37PM +0900, Naoya Horiguchi wrote: > From: Naoya Horiguchi Hi Naoya, good catch! > Currently me_huge_page() temporary unlocks page to perform some actions > then locks it again later. My testcase (which calls hard-offline on some > tail page in a hugetlb, then accesses the address of the hugetlb range) > showed that page allocation code detects the page lock on buddy page and > printed out "BUG: Bad page state" message. PG_hwpoison does not prevent > it because PG_hwpoison flag is set on any subpage of the hugetlb page > but the 2nd page lock is on the head page. I am having difficulties to parse "PG_hwpoison does not prevent it because PG_hwpoison flag is set on any subpage of the hugetlb page". What do you mean by that? > > This patch suggests to drop the 2nd page lock to fix the issue. > > Fixes: commit 78bb920344b8 ("mm: hwpoison: dissolve in-use hugepage in unrecoverable memory error") > Cc: stable@vger.kernel.org > Signed-off-by: Naoya Horiguchi The fix looks fine to me: Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE L3