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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 49E5FC433DB for ; Fri, 5 Mar 2021 07:27:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DFEF164EC9 for ; Fri, 5 Mar 2021 07:27:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229489AbhCEH1D (ORCPT ); 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