From patchwork Fri Apr 8 13:53:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naoya Horiguchi X-Patchwork-Id: 12806793 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C953CC433EF for ; Fri, 8 Apr 2022 13:53:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5E5796B0072; Fri, 8 Apr 2022 09:53:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5948F6B0073; Fri, 8 Apr 2022 09:53:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 482C76B0074; Fri, 8 Apr 2022 09:53:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0185.hostedemail.com [216.40.44.185]) by kanga.kvack.org (Postfix) with ESMTP id 34CE76B0072 for ; Fri, 8 Apr 2022 09:53:31 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E97D1A79AC for ; Fri, 8 Apr 2022 13:53:30 +0000 (UTC) X-FDA: 79333854180.29.8E38BFA Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf23.hostedemail.com (Postfix) with ESMTP id 4475D14000C for ; Fri, 8 Apr 2022 13:53:30 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1649426008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=W2r3hadHb2ghvLbnBdq0sszcrAONUNR+RmAPKjBEqZc=; b=tH3yGnWR+WLSgQRKZFS2/V39ZxZMnDGzUl+9U4g0C8evMnR09lKrasCEEX7riR+1QCZ/yw fpTZmaqUChLlJ2bEB3wCSZXf2uCKypfxcL4F5i6nYkNPvQV7ZfsGhCEQYN3Zp+ewt4hVlU wImQQPTnwyXiuvk+MUKhQJuATt59BH0= From: Naoya Horiguchi To: linux-mm@kvack.org Cc: Andrew Morton , Mike Kravetz , Miaohe Lin , Yang Shi , Dan Carpenter , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: [PATCH v8 0/3] mm/hwpoison: fix race between hugetlb free/demotion and memory_failure_hugetlb() Date: Fri, 8 Apr 2022 22:53:20 +0900 Message-Id: <20220408135323.1559401-1-naoya.horiguchi@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: on43ssky7r8d3rdtb4g1ur3j5nsagunu Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=tH3yGnWR; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf23.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev X-Rspamd-Queue-Id: 4475D14000C X-HE-Tag: 1649426010-459797 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, I updated v7 (https://lore.kernel.org/linux-mm/20220407112929.1344748-1-naoya.horiguchi@linux.dev/) based on the comment from Miaohe Lin. Now I have a few additional patches. Any comments and suggestions are welcomed. Thanks, Naoya Horiguchi --- Summary: Naoya Horiguchi (3): mm/hwpoison: fix race between hugetlb free/demotion and memory_failure_hugetlb() mm/hwpoison: put page in already hwpoisoned case with MF_COUNT_INCREASED Revert "mm/memory-failure.c: fix race with changing page compound again" include/linux/hugetlb.h | 6 ++ include/linux/mm.h | 9 ++- include/ras/ras_event.h | 1 - mm/hugetlb.c | 10 ++++ mm/memory-failure.c | 152 ++++++++++++++++++++++++++++++++---------------- 5 files changed, 126 insertions(+), 52 deletions(-)