Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp1151380imk; Sun, 3 Jul 2022 18:52:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tctpTOTJaf9v2YwruahuI1Xc7F5Me6FhqNkeX7R1CqG2IgErDzOf0bhspUkntbKtw/2FX2 X-Received: by 2002:a63:9d88:0:b0:40c:9c4d:29ba with SMTP id i130-20020a639d88000000b0040c9c4d29bamr23598639pgd.590.1656899568075; Sun, 03 Jul 2022 18:52:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656899568; cv=none; d=google.com; s=arc-20160816; b=dUun8atGxSUEWITOSY61ZZ1/tprnLdLi6ukB7gPGNW+ZAw6S/V8MTCcHSVuM1+D0lL RCANRclKQsNSUUk1kxD7AwAAbmwJNOX13kKMwW7XheXD6w9AqNSzDE5RSBt8U/7s/hTI VUIXP0M+D7WvET+u7ti/et38MN6EjR0brvN1wv8+o/A8YC9TkL+ag0Nb7EN8q06T9iui xWHx2IxHVy3P+qyiyF/KitRIJfQKHMou06j6AFxxvkzv++DikcZYV27sbsGRqUuOxUHZ H70vqBuqqeX72twMh+p36GhHhWUx7frVuDZq+gbEDYYG8JIUTbkY+WF+Nw4/YzVzy+56 MT5g== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=JfkJEj/WqT1F2otXKjUQAyvU6CkkQ7nUdG/hu5jciW4=; b=b2Vdb8xQiwGPtugtqYPGGXQmEZqlFyRT7gsufm1GHoNP+II/FD0m/hXQ+S6tD/HZxV GNseU3Fg8wl8zLZufkxK3aPo49TFcNqqz1bj/CuPbfK6PFvWWPhERddoRC3h0uDW9cj8 7CTprPGRKCyyBpwCO1imRn/QVNKM0zHqd/LIwMWXRbxcldW48+936/Qagrbk7Ox5yMA3 B/c7Qw10eBe2hXMoU7lXLIcPSxa3s8Zaec+g1UjAH6xNGjp15ywl1tqfwMaf+aMmZv8q +rPmCoiaXUcKmTJNlt9Saf35Qf0cH0mRgweITuB7cMVZ4tEyZwynH9hJplVtW4LcaXKO aohQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=QYjD4qaV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w27-20020a63161b000000b0040c83d87466si21228914pgl.462.2022.07.03.18.52.31; Sun, 03 Jul 2022 18:52:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=QYjD4qaV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233050AbiGDBnQ (ORCPT + 99 others); Sun, 3 Jul 2022 21:43:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233035AbiGDBnH (ORCPT ); Sun, 3 Jul 2022 21:43:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6540864E5 for ; Sun, 3 Jul 2022 18:43:01 -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 E79A66134B for ; Mon, 4 Jul 2022 01:43:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8FC9C341C6; Mon, 4 Jul 2022 01:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1656898980; bh=/LMQ8BboRFFus9I/l+fXn306egan/qVJVZnhwpwGzBw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QYjD4qaV1QJKWOycKvk8iwmzRD8fmoKoPmYJtUEuuPU6jL+YskiZxAQepyT47cyZt XGe+2xlP/tORKOZPfqfARmSU0oI923n/NM1ZghDyo1yDT3x/bfP7UnJFJPg/iG0YcS Adm05c6sOnFb+/uRhYOJ4aLgv+8NgxsnCqMVzBCE= Date: Sun, 3 Jul 2022 18:42:59 -0700 From: Andrew Morton To: Naoya Horiguchi Cc: linux-mm@kvack.org, David Hildenbrand , Mike Kravetz , Miaohe Lin , Liu Shixin , Yang Shi , Oscar Salvador , Muchun Song , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: Re: [mm-unstable PATCH v4 2/9] mm/hugetlb: separate path for hwpoison entry in copy_hugetlb_page_range() Message-Id: <20220703184259.99a37313037000bd2e9ace9a@linux-foundation.org> In-Reply-To: <20220704013312.2415700-3-naoya.horiguchi@linux.dev> References: <20220704013312.2415700-1-naoya.horiguchi@linux.dev> <20220704013312.2415700-3-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 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 4 Jul 2022 10:33:05 +0900 Naoya Horiguchi wrote: > Originally copy_hugetlb_page_range() handles migration entries and hwpoisoned > entries in similar manner. But recently the related code path has more code > for migration entries, and when is_writable_migration_entry() was converted > to !is_readable_migration_entry(), hwpoison entries on source processes got > to be unexpectedly updated (which is legitimate for migration entries, but > not for hwpoison entries). This results in unexpected serious issues like > kernel panic when forking processes with hwpoison entries in pmd. > > Separate the if branch into one for hwpoison entries and one for migration > entries. > > ... > > Cc: # 5.18 It's unusual to have a cc:stable patch in the middle of a series like this. One would expect the fix to be a standalone thing against current -linus. As presented, this patch won't get into mainline until after 5.20-rc1. If that's OK then OK. Otherwise I can shuffle things around and stage this patch in mm-hotfixes?