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=-13.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 40C67C4320E for ; Wed, 1 Sep 2021 08:10:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E2905610C9 for ; Wed, 1 Sep 2021 08:10:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E2905610C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 8D7826B0071; Wed, 1 Sep 2021 04:10:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 887E68D0001; Wed, 1 Sep 2021 04:10:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 750D46B0073; Wed, 1 Sep 2021 04:10:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0246.hostedemail.com [216.40.44.246]) by kanga.kvack.org (Postfix) with ESMTP id 65E616B0071 for ; Wed, 1 Sep 2021 04:10:42 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 1E66E235D8 for ; Wed, 1 Sep 2021 08:10:42 +0000 (UTC) X-FDA: 78538283124.31.20906BD Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf23.hostedemail.com (Postfix) with ESMTP id BE63D900009B for ; Wed, 1 Sep 2021 08:10:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630483841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jUY5Z2Iv6OS7sO/OYd+l0I4AgGgtwOSQSuYxV74fDgk=; b=ecornHoLJ0cErZFylD70lJ1vckE3+GQLAfUWDu9qomYCeYg5ngq9tDPAA9hJkl/xNXn+V0 ZPuTA+aUx9r5DE8W83Az1NcOBrEKlDuTlpYciblv9d28EG0gV47MM/Zhk9vg6KCE14v6N0 +IoGzoMdQxfeqMYzFjThWZWnQQ4HiTU= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-299-eJa2T9AuPHWa8o89qv6Wgw-1; Wed, 01 Sep 2021 04:10:37 -0400 X-MC-Unique: eJa2T9AuPHWa8o89qv6Wgw-1 Received: by mail-wr1-f70.google.com with SMTP id z16-20020adfdf90000000b00159083b5966so498991wrl.23 for ; Wed, 01 Sep 2021 01:10:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=jUY5Z2Iv6OS7sO/OYd+l0I4AgGgtwOSQSuYxV74fDgk=; b=AXFMoq79/ZUyX5K0zID9UFcmWNHn+RjoqKtBd9ZJCIL2ZKnC7I14QRsnFuQ2I2em2t Iaq/h5X7IxLebVlK25SYCSAigBTfumDQZkgBPJR5MPdYtaVcUGQESKJoeIpegqBUB/LP aFDe9FA23aS3AbD/xtg1/xeLq/TdargB6s732LRiDIJw7B2LXJkCOOQxEr2TaU52dVfM Sy+L2C6lLwqy5CVSpCkkDNo34pPZphLHuj06arAV7+iRZ5aqXc4W0qzeMnM5zYg1MqYU V8AqQqd2SspWPW5CerTjSUOY6dXL5+K8z/0a8IrP9nHe7zy4vWlZ/y+mV5+Jd19M9Lfg fAcA== X-Gm-Message-State: AOAM532m347d23FWSXGNa1Vk98ghAd4Vkgs5SCZXxC5m/W8B+QuJ6lTZ ZTLPUpHA9LJuwmLK3a7QsFFrKsOq0qgZ9cfJAsFSieSDIHfrQhYoo31Y3Rp0WqHA3/CDXv1ITR+ cHzQWKHwUzHM= X-Received: by 2002:a5d:4844:: with SMTP id n4mr35936871wrs.191.1630483836549; Wed, 01 Sep 2021 01:10:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoqaZqBTvVMe5dKfHcnx0bDUHB7P+ekcTkmSMATj4BEgp7WPgiI8UHBNpNryCD8J3Pkyf15A== X-Received: by 2002:a5d:4844:: with SMTP id n4mr35936849wrs.191.1630483836354; Wed, 01 Sep 2021 01:10:36 -0700 (PDT) Received: from [192.168.3.132] (p4ff23f71.dip0.t-ipconnect.de. [79.242.63.113]) by smtp.gmail.com with ESMTPSA id m186sm4747276wme.48.2021.09.01.01.10.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Sep 2021 01:10:35 -0700 (PDT) Subject: Re: [PATCH 5/6] mm/page_alloc.c: avoid accessing uninitialized pcp page migratetype To: Miaohe Lin Cc: akpm@linux-foundation.org, vbabka@suse.cz, sfr@canb.auug.org.au, peterz@infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, 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: David Hildenbrand Organization: Red Hat Message-ID: Date: Wed, 1 Sep 2021 10:10:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=ecornHoL; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf23.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=david@redhat.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: BE63D900009B X-Stat-Signature: fbfpqao7a6khm5ohh4piyo559hukah7q X-HE-Tag: 1630483841-985796 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 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. -- Thanks, David / dhildenb