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=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 A3073C433EF for ; Wed, 15 Sep 2021 02:09:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5A09F61246 for ; Wed, 15 Sep 2021 02:09:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5A09F61246 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id E6F3C6B0071; Tue, 14 Sep 2021 22:09:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E2015900002; Tue, 14 Sep 2021 22:09:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D0E8F6B0073; Tue, 14 Sep 2021 22:09:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0163.hostedemail.com [216.40.44.163]) by kanga.kvack.org (Postfix) with ESMTP id BD6CC6B0071 for ; Tue, 14 Sep 2021 22:09:54 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 702F418134594 for ; Wed, 15 Sep 2021 02:09:54 +0000 (UTC) X-FDA: 78588177108.24.2746198 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf07.hostedemail.com (Postfix) with ESMTP id 191071000098 for ; Wed, 15 Sep 2021 02:09:53 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 7D17360FA0; Wed, 15 Sep 2021 02:09:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1631671791; bh=rgZjwT28lKf5bS2kz34I0iU8KQ5dMH60bRht1FuxNGY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LP3fxlPEJZpKwQXpAu48QirMdteL+hj+rbmHFM/GmGmUgtCUZ6OpEeyd/yC7RW70z MeXCd8qY62fChs3r7ftfFQwNSmrrHLjh55QDGhvT2mb6r3feTlDvJSZw5Yd4HLHmZZ pi587E5KOTD1F/RPHWeWZ1yKVVkc0ixgrd3rt5Zo= Date: Tue, 14 Sep 2021 19:09:51 -0700 From: Andrew Morton To: Miaohe Lin Cc: , , , , , Subject: Re: [PATCH v3] mm/page_isolation: guard against possible putback unisolated page Message-Id: <20210914190951.2e44de6a55a0c7004d5381b3@linux-foundation.org> In-Reply-To: <20210914114508.23725-1-linmiaohe@huawei.com> References: <20210914114508.23725-1-linmiaohe@huawei.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 191071000098 X-Stat-Signature: 4gxtcncf3zhpppfpqmt8zf9arqxn88tf Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=LP3fxlPE; spf=pass (imf07.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1631671793-28859 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 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? Is a cc:stable justified?