Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3613413pxj; Tue, 11 May 2021 08:12:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyI0RnebYp74eV45EXwdj+Ki9urRRgIlTpAjkiTjz8eaptrSYmr+eZ9nRFWe0EEleuBD06m X-Received: by 2002:a17:906:b0c:: with SMTP id u12mr1582816ejg.37.1620745927982; Tue, 11 May 2021 08:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620745927; cv=none; d=google.com; s=arc-20160816; b=agE75EJ/8EGCl11t0jinj99OGoW+EKbt/bpGL+5DEM5hjVQvC9Yy267DKNps9wVoF4 8eAoVoWYckWipDPIFzDMpooqrTvsGtrwqavVPeT/UxDEPvqc9cyD6BSTTyY4NuGFDbXJ 5e7r05ijG8/i62eOBnjnWwAyAhckgg3h3xDScg23pzxS2AXLi+jcc3MZCHoyX7eooUkN cwbCgYNYOPz80/+CYL3O/tij+ahj76eKkkXsS3FYknbA3o+BILh35AeVtcETyEUpnYsr mV+cMC6c+85ydi7HBth56J7t1OypIp16XgYHGEIhmqsmsWbXQjoBzVLEY4ecnOmlJZFp KeCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=DwTrcsYF66Ci4WqwAE8b4kjaAXXOd3wz6jRbttr9oyU=; b=0bRonbrbsL0Qn8GfkvaV17Bq/1TiYUY8IrrhH/3bF9u3risKfKO2LubDWUALVKG0AF 9umwQqahcJBoyndmcF7UtYqOO880FcQOALVErNPxBxdlnCEc1ecOSot0sb3l/3PIysUc 53ezgLwnvuOKZrEBpnoZjaBrOPdN/BjnHYmDAaHgPHmnzsbtgwEKRQboHfpt6KO9+OSo IuLVWUVGxS8OK3HRfV0a3OGilLKYxcD6duCHutXhrSEHQUjdi2sx0br/3S9hkGiaO/YW 4nbdCjTi+i7GbvKYzv4XZub2UpP1yOi7SA+N9S4OqVdxuMT0KAoplGOWPDJCb5dWeCtn dKGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L9K3mMvV; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rs22si2064931ejb.404.2021.05.11.08.11.43; Tue, 11 May 2021 08:12:07 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L9K3mMvV; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231825AbhEKPLj (ORCPT + 99 others); Tue, 11 May 2021 11:11:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231774AbhEKPLi (ORCPT ); Tue, 11 May 2021 11:11:38 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BDB0C061574 for ; Tue, 11 May 2021 08:10:32 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id m124so15930609pgm.13 for ; Tue, 11 May 2021 08:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DwTrcsYF66Ci4WqwAE8b4kjaAXXOd3wz6jRbttr9oyU=; b=L9K3mMvViE1Oc7+lgOxeFPBpl/ORwxmksqUJFWQTLQW4ErZeqwC1WCy68gijKQWiGl DeXTkYx1M0XqgjE8g3ug701R/20dso1WytlXhcjFUgQza/OFtGbBt4n9VvqI+VkWxsDO Xp4axad5iDPZ2fqqhBtvuKtvQAU+mIVL/8GwhPGXFLWFrXwAfGWH7nDPXK8iFJp4uB8t 3OGaY5emBnVef+kJ+RYggM7mSBawtSCTHxVEXeCmK5OOTpzjigu0g49FAA4boVAyr9sk qFKSVAsp5reOVNi9qP95eZH20ykLYitXGy3ZMAgLK+Z0BvIywpyi/idmIl3/fTVqL0Oz gJPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DwTrcsYF66Ci4WqwAE8b4kjaAXXOd3wz6jRbttr9oyU=; b=PIMHw/4i59CQELLmCp3voTfUMWmnrIkZX2SdbcC0yMvj17WAnnDdUj6nbIbnxtQLhM pN7fs0DJyurcIlU5VOtT+G1OACh8/MgktIy9zjj6CZ0fwp/LJADPNYrPFwZ29vHxiS/n XNdDoh8G0Qk9WATm8Es3aPJScupNJt28YfrEeH2qQRZv1NrrbbeEJp7zsdRYd56qbWxu OByIwbM0p03C9F7GmLz+vRSz3owkbiLNTffe8NH4JGMv5b9ZoK684O5+QGcD18p9fY/t YMyaTLsg8oyJnXzmyJWknHKLAaZb/mmPdlvcpWG0nhIVRF8Nj2em7PgzU4p0Iz36vKnB a2Ug== X-Gm-Message-State: AOAM532GUb5uE+CugSqYrnuvOGaA2K9Kr493dI8DHgK0ytLJceeMKDU5 +kq1gMyxk49MpMsAXd3tnQ== X-Received: by 2002:a63:2115:: with SMTP id h21mr31517103pgh.191.1620745831722; Tue, 11 May 2021 08:10:31 -0700 (PDT) Received: from localhost.localdomain (h175-177-040-153.catv02.itscom.jp. [175.177.40.153]) by smtp.gmail.com with ESMTPSA id a18sm14376456pgg.51.2021.05.11.08.10.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 08:10:31 -0700 (PDT) From: Naoya Horiguchi To: Oscar Salvador , Muchun Song , linux-mm@kvack.org Cc: Andrew Morton , Mike Kravetz , Michal Hocko , Tony Luck , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: [PATCH v3 0/2] hwpoison: fix race with compound page allocation Date: Wed, 12 May 2021 00:10:14 +0900 Message-Id: <20210511151016.2310627-1-nao.horiguchi@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi everyone, I updated the patch for the issue reported by Muchun Song in [1]. I separated into two patches (to reduce the size of core fix for stable): patch 1/2 focuses on preventing VM_BUG_ON_PAGE() in the reported race. Patch 2/2 includes some code improvement like calling retry code, revising the function comment, and some refactoring. Any comment and testing would be appreciated. Thanks, Naoya Horiguchi [1] https://lore.kernel.org/linux-mm/20210421060259.67554-1-songmuchun@bytedance.com/T/ --- Summary: Naoya Horiguchi (2): mm,hwpoison: fix race with compound page allocation mm,hwpoison: make get_hwpoison_page call get_any_page() mm/memory-failure.c | 169 +++++++++++++++++++++++++++++----------------------- 1 file changed, 96 insertions(+), 73 deletions(-)