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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAF88C433EF for ; Mon, 4 Apr 2022 22:08:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381730AbiDDWIr (ORCPT ); Mon, 4 Apr 2022 18:08:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380077AbiDDSzd (ORCPT ); Mon, 4 Apr 2022 14:55:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57FAB10ED for ; Mon, 4 Apr 2022 11:53:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E625B60DB5 for ; Mon, 4 Apr 2022 18:53:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F245FC340F3; Mon, 4 Apr 2022 18:53:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1649098414; bh=bYc4+MnhRyUZvvG3xV2Z/0MMfIXFk8Y9boux0z/HsrQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZIuIXzk8J8KGwxOyL9hJ1cNBUn/IZ+LRc/Rs24gYR0RFSoypqfqgAAEmPu449Je5/ WOzKsmRcBu76tozGhdbBzA4TiwWDT+XzuXNjNWxA8E2d2flj88tdbaEU+EcB0lElrJ xOOhH3eUgb2DxsqofuPMvzPKtFJn4ERUnNS+Wmdo= Date: Mon, 4 Apr 2022 11:53:33 -0700 From: Andrew Morton To: Naoya Horiguchi Cc: linux-mm@kvack.org, Mike Kravetz , Miaohe Lin , Yang Shi , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: Re: [PATCH v6] mm/hwpoison: fix race between hugetlb free/demotion and memory_failure_hugetlb() Message-Id: <20220404115333.8cf80b9d3a7a55993ed60c57@linux-foundation.org> In-Reply-To: <20220404092131.751733-1-naoya.horiguchi@linux.dev> References: <20220404092131.751733-1-naoya.horiguchi@linux.dev> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 4 Apr 2022 18:21:31 +0900 Naoya Horiguchi wrote: > There is a race condition between memory_failure_hugetlb() and hugetlb > free/demotion, which causes setting PageHWPoison flag on the wrong page. > The one simple result is that wrong processes can be killed, but another > (more serious) one is that the actual error is left unhandled, so no one > prevents later access to it, and that might lead to more serious results > like consuming corrupted data. Should this fix be backported into stable kernels?