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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 D0666C433ED for ; Wed, 21 Apr 2021 08:49:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 879C961440 for ; Wed, 21 Apr 2021 08:49:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237131AbhDUIts (ORCPT ); Wed, 21 Apr 2021 04:49:48 -0400 Received: from mx2.suse.de ([195.135.220.15]:41344 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231685AbhDUItr (ORCPT ); Wed, 21 Apr 2021 04:49:47 -0400 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 D9E81B176; Wed, 21 Apr 2021 08:49:13 +0000 (UTC) Date: Wed, 21 Apr 2021 10:49:11 +0200 From: Oscar Salvador To: Muchun Song Cc: Michal Hocko , Mike Kravetz , Andrew Morton , Linux Memory Management List , LKML , Naoya Horiguchi Subject: Re: [External] Re: [PATCH] mm: hugetlb: fix a race between memory-failure/soft_offline and gather_surplus_pages Message-ID: <20210421084911.GH22456@linux> References: <20210421060259.67554-1-songmuchun@bytedance.com> <20210421082103.GE22456@linux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 21, 2021 at 04:41:10PM +0800, Muchun Song wrote: > But softoffline does not set page hwpoison before > __get_hwpoison_page(). So the page still can be > allocated. Right? Yep, soft_offline() only marks the page as hwpoison once the page has been fully contended and no other use is possible. But yeah, hugetlb is a bit trickier in that regard. This needs fixing in there. -- Oscar Salvador SUSE L3