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=-5.3 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 80221C64E7B for ; Mon, 30 Nov 2020 15:57:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CB8CF2076E for ; Mon, 30 Nov 2020 15:57:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB8CF2076E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DF0AA8D0007; Mon, 30 Nov 2020 10:57:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D79158D0002; Mon, 30 Nov 2020 10:57:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF4DE8D0007; Mon, 30 Nov 2020 10:57:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0191.hostedemail.com [216.40.44.191]) by kanga.kvack.org (Postfix) with ESMTP id A6E448D0002 for ; Mon, 30 Nov 2020 10:57:42 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 5860D181AEF1A for ; Mon, 30 Nov 2020 15:57:42 +0000 (UTC) X-FDA: 77541539964.21.slave02_23069b1273a3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id 03FA318044609 for ; Mon, 30 Nov 2020 15:57:41 +0000 (UTC) X-HE-Tag: slave02_23069b1273a3 X-Filterd-Recvd-Size: 3525 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Mon, 30 Nov 2020 15:57:40 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 5145EAD6B; Mon, 30 Nov 2020 15:57:39 +0000 (UTC) Subject: Re: [External] Re: [PATCH] mm/memcg: fix NULL pointer dereference at workingset_eviction To: Michal Hocko , Muchun Song Cc: Andrew Morton , Johannes Weiner , Shakeel Butt , Roman Gushchin , Stephen Rothwell , alex.shi@linux.alibaba.com, alexander.h.duyck@linux.intel.com, Yafang Shao , richard.weiyang@gmail.com, LKML , Linux Memory Management List References: <20201130131512.6043-1-songmuchun@bytedance.com> <20201130132345.GJ17338@dhcp22.suse.cz> <20201130134514.GL17338@dhcp22.suse.cz> From: Vlastimil Babka Message-ID: Date: Mon, 30 Nov 2020 16:57:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20201130134514.GL17338@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 11/30/20 2:45 PM, Michal Hocko wrote: > On Mon 30-11-20 21:36:49, Muchun Song wrote: >> On Mon, Nov 30, 2020 at 9:23 PM Michal Hocko wrote: >> > >> > On Mon 30-11-20 21:15:12, Muchun Song wrote: >> > > We found a case of kernel panic. The stack trace is as follows >> > > (omit some irrelevant information): >> > > >> > > BUG: kernel NULL pointer dereference, address: 00000000000000c8 >> > > RIP: 0010:workingset_eviction+0x26b/0x450 >> > > Call Trace: >> > > __remove_mapping+0x224/0x2b0 >> > > shrink_page_list+0x8c2/0x14e0 >> > > shrink_inactive_list+0x1bf/0x3f0 >> > > ? do_raw_spin_unlock+0x49/0xc0 >> > > ? _raw_spin_unlock+0xa/0x20 >> > > shrink_lruvec+0x401/0x640 >> > > >> > > This was caused by commit 76761ffa9ea1 ("mm/memcg: bail out early when >> > > !memcg in mem_cgroup_lruvec"). When the parameter of memcg is NULL, we >> > > should not use the &pgdat->__lruvec. So this just reverts commit >> > > 76761ffa9ea1 to fix it. >> > > >> > > Fixes: 76761ffa9ea1 ("mm/memcg: bail out early when !memcg in mem_cgroup_lruvec") >> > >> > I do not see any commits like that in the current Linus tree. Is this a >> > commit id from the linux-next? If yes, can we just fold it into the >> > respective patch in mmotm tree please? >> >> Yes. This commit is on the linux-next tree. > > FYI, patches coming from mmotm are constantly rebased in linux-next so > the sha1 is meaningless and shouldn't be added as a reference in the > changelog. > >> Of course can. > > Thanks! I believe Andrew should be able to just pick up the patch and > make it -fix patch. Well the fix is a revert, so just remove the patch from mmotm/next? BTW, looks like it wasn't sent to linux-mm [1], looks like missing To: header. [1] https://lore.kernel.org/lkml/1606446515-36069-1-git-send-email-alex.shi@linux.alibaba.com/