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=-11.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 24762C4320E for ; Wed, 1 Sep 2021 08:19:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08D416103A for ; Wed, 1 Sep 2021 08:19:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243059AbhIAITz (ORCPT ); Wed, 1 Sep 2021 04:19:55 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:14447 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243060AbhIAITw (ORCPT ); Wed, 1 Sep 2021 04:19:52 -0400 Received: from dggeme703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4GzxgR09kbzbg6S; Wed, 1 Sep 2021 16:14:59 +0800 (CST) Received: from [10.174.178.75] (10.174.178.75) 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, 1 Sep 2021 16:18:53 +0800 Subject: Re: [PATCH 5/6] mm/page_alloc.c: avoid accessing uninitialized pcp page migratetype To: David Hildenbrand CC: , , , , , , Mel Gorman References: <20210830141051.64090-1-linmiaohe@huawei.com> <20210830141051.64090-6-linmiaohe@huawei.com> <20210831134311.GG4128@techsingularity.net> <877b7043-65c3-5e08-ac89-ad6f10e354b3@redhat.com> From: Miaohe Lin Message-ID: Date: Wed, 1 Sep 2021 16:18:53 +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: Content-Type: text/plain; charset="iso-8859-15" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.178.75] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggeme703-chm.china.huawei.com (10.1.199.99) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/9/1 16:10, David Hildenbrand wrote: > On 01.09.21 10:02, Miaohe Lin wrote: >> On 2021/8/31 22:23, David Hildenbrand wrote: >>> On 31.08.21 15:43, Mel Gorman wrote: >>>> On Mon, Aug 30, 2021 at 10:10:50PM +0800, Miaohe Lin wrote: >>>>> If it's not prepared to free unref page, the pcp page migratetype is >>>>> unset. Thus We will get rubbish from get_pcppage_migratetype() and >>>>> might list_del &page->lru again after it's already deleted from the >>>>> list leading to grumble about data corruption. >>>>> >>>>> Fixes: 3dcbe270d8ec ("mm/page_alloc: avoid conflating IRQs disabled with zone->lock") >>>>> Signed-off-by: Miaohe Lin >>>> >>>> Acked-by: Mel Gorman >>>> >>>> This fix is fairly important. Take this patch out and send it on its own >>>> so it gets picked up relatively quickly. It does not belong in a series >>>> that is mostly cosmetic cleanups. >>> >>> I think the commit id is wrong. Shouldn't that be >>> >>> df1acc856923 ("mm/page_alloc: avoid conflating IRQs disabled with zone->lock") >>> >>> ? >>> >> >> Many thanks for pointing this out. >> >> I used to save the git log in a file to make life easier. But it seems this leads >> to the old commit id above. >> >> commit 3dcbe270d8ec57e534f5c605279cdc3ceb1f044a >> Author: Mel Gorman >> Date:   Fri Jun 4 14:20:03 2021 +1000 >> >>      mm/page_alloc: avoid conflating IRQs disabled with zone->lock >> >> git name-rev 3dcbe270d8ec >> 3dcbe270d8ec tags/next-20210604~2^2~196 >> >> vs >> >> commit df1acc856923c0a65c28b588585449106c316b71 >> Author: Mel Gorman >> Date:   Mon Jun 28 19:42:00 2021 -0700 >> >>      mm/page_alloc: avoid conflating IRQs disabled with zone->lock >> >> git name-rev df1acc856923 >> df1acc856923 tags/next-20210630~2^2~278 >> >> Their contents are same but with different commit id. The previous one >> could have been git-rebased. >> > > -mm tree commit ids keep changing until patches are upstream. Therefore, you can observe changing commit ids in -next. Always use the ones from Linus' tree, they are stable. > Many thanks for your advice, David. :)