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 X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57DA6C433EF for ; Wed, 15 Sep 2021 06:37:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D71C261157 for ; Wed, 15 Sep 2021 06:37:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D71C261157 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 5F2F0940007; Wed, 15 Sep 2021 02:37:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A34E6B0073; Wed, 15 Sep 2021 02:37:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4B8F3940007; Wed, 15 Sep 2021 02:37:51 -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 3C4D56B0072 for ; Wed, 15 Sep 2021 02:37:51 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id F0F3018347329 for ; Wed, 15 Sep 2021 06:37:50 +0000 (UTC) X-FDA: 78588852300.36.246BA3C Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf01.hostedemail.com (Postfix) with ESMTP id 3EC835059EBC for ; Wed, 15 Sep 2021 06:37:50 +0000 (UTC) Received: from dggeme703-chm.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4H8Vqd6yC4zW2TD; Wed, 15 Sep 2021 14:36:45 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) by dggeme703-chm.china.huawei.com (10.1.199.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.8; Wed, 15 Sep 2021 14:37:46 +0800 Subject: Re: [PATCH v3] mm/page_isolation: guard against possible putback unisolated page To: Andrew Morton CC: , , , , , References: <20210914114508.23725-1-linmiaohe@huawei.com> <20210914190951.2e44de6a55a0c7004d5381b3@linux-foundation.org> From: Miaohe Lin Message-ID: <9c22734e-0549-f9a1-36a0-1311a54e7d06@huawei.com> Date: Wed, 15 Sep 2021 14:37:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210914190951.2e44de6a55a0c7004d5381b3@linux-foundation.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggeme703-chm.china.huawei.com (10.1.199.99) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 3EC835059EBC Authentication-Results: imf01.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=huawei.com; spf=pass (imf01.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Stat-Signature: 9od8u8z7n5wa9hjauzicf51oimzms1sw X-HE-Tag: 1631687870-238851 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: On 2021/9/15 10:09, Andrew Morton wrote: > On Tue, 14 Sep 2021 19:45:08 +0800 Miaohe Lin wrote: > >> Isolating a free page in an isolated pageblock is expected to always work >> as watermarks don't apply here. But if __isolate_free_page() failed, due >> to condition changes, the page will be left on the free list. And the page >> will be put back to free list again via __putback_isolated_page(). This may >> trigger VM_BUG_ON_PAGE() on page->flags checking in __free_one_page() if >> PageReported is set. Or we will corrupt the free list because list_add() >> will be called for pages already on another list. Add a VM_WARN_ON() to >> complain about this change. > > Are you able to identify a Fixes: here? > Sure, this should be "Fixes: 3c605096d315 ("mm/page_alloc: restrict max order of merging on isolated pageblock")." > Is a cc:stable justified? I'm afraid not. As David pointed out, "" In unset_migratetype_isolate() we check that is_migrate_isolate_page(page) holds, otherwise we return. We call __isolate_free_page() only for such pages. __isolate_free_page() won't perform watermark checks on is_migrate_isolate(). Consequently, __isolate_free_page() should never fail when called from unset_migratetype_isolate() "" In a nutshell, __isolate_free_page can not fail here. So it is harmless now and doesn't worth cc:stable. Please see https://www.spinics.net/lists/linux-mm/msg269434.html for detail. Many thanks. > . >