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 2B9F0C432BE for ; Wed, 1 Sep 2021 08:18:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C727E61053 for ; Wed, 1 Sep 2021 08:18:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C727E61053 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 685326B006C; Wed, 1 Sep 2021 04:18:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 634DF6B0071; Wed, 1 Sep 2021 04:18:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 524696B0072; Wed, 1 Sep 2021 04:18:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0009.hostedemail.com [216.40.44.9]) by kanga.kvack.org (Postfix) with ESMTP id 42BB06B006C for ; Wed, 1 Sep 2021 04:18:58 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id F24F82776C for ; Wed, 1 Sep 2021 08:18:57 +0000 (UTC) X-FDA: 78538303914.21.CAC22C9 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf28.hostedemail.com (Postfix) with ESMTP id 3137290000A4 for ; Wed, 1 Sep 2021 08:18:57 +0000 (UTC) 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 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 Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=huawei.com; spf=pass (imf28.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Stat-Signature: quecp19qmu3qkssntz97bwgomr4dazun X-Rspamd-Queue-Id: 3137290000A4 X-Rspamd-Server: rspam04 X-HE-Tag: 1630484337-14484 Content-Transfer-Encoding: quoted-printable 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/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 i= s >>>>> 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 ser= ies >>>> 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 zon= e->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:=A0=A0 Fri Jun 4 14:20:03 2021 +1000 >> >> =A0=A0=A0=A0 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:=A0=A0 Mon Jun 28 19:42:00 2021 -0700 >> >> =A0=A0=A0=A0 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. >> >=20 > -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. >=20 Many thanks for your advice, David. :)