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 06C12C433EF for ; Mon, 4 Jul 2022 01:43:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233130AbiGDBnQ (ORCPT ); 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 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?