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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B729CD8CA9 for ; Tue, 10 Oct 2023 16:16:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C1A6D8D00BA; Tue, 10 Oct 2023 12:16:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BCA1B8D0002; Tue, 10 Oct 2023 12:16:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AB8C08D00BA; Tue, 10 Oct 2023 12:16:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 993548D0002 for ; Tue, 10 Oct 2023 12:16:41 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 5BFE41CA463 for ; Tue, 10 Oct 2023 16:16:41 +0000 (UTC) X-FDA: 81330055002.28.5D64404 Received: from out-197.mta1.migadu.com (out-197.mta1.migadu.com [95.215.58.197]) by imf08.hostedemail.com (Postfix) with ESMTP id 22C7E160022 for ; Tue, 10 Oct 2023 16:16:37 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=l4Q0L+4m; spf=pass (imf08.hostedemail.com: domain of roman.gushchin@linux.dev designates 95.215.58.197 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696954598; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=WmkfnsxJtGs5yl/Oef53MTcFvzXpG1BX85JTgBM9gX8=; b=RBisLY/HJyPCTBXeVc6DpsSa9ZLpzzQQdnK83+IHqZCuK4J8BBzp9r/WqHmM6ve1N34sco eOxLSjeZYicDQssjRT8f75WLPFuA66ZtfXJHtuhxbdchkWAD17OpAnebfAauLL2bbfav9g 6tKucI9/N+VcTiPXuyiiBvgVdRRrmuA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696954598; a=rsa-sha256; cv=none; b=kjBvJ6FsoTWdXbETby5ppyAI7qrP+v3ZLfcC9MZl3qL0lScbRw98jxvUN8xOc+wAbrVL6A 6OQ0Tk0tOoyJFeqrRaFNHxAdN3LtCvzBv96t6T5LhSBK+VOxb6lwGGTKKV+eDB7M17A2B7 tUYfiNa1pMXTOvvVZ4NWASY4tFzV5jA= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=l4Q0L+4m; spf=pass (imf08.hostedemail.com: domain of roman.gushchin@linux.dev designates 95.215.58.197 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev; dmarc=pass (policy=none) header.from=linux.dev Date: Tue, 10 Oct 2023 09:16:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1696954595; 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: in-reply-to:in-reply-to:references:references; bh=WmkfnsxJtGs5yl/Oef53MTcFvzXpG1BX85JTgBM9gX8=; b=l4Q0L+4m2K3EswOmsrSNlkZtisQ5VtTSjIRw/Atj4c5uZ6BpYawr3ItmA9oITVfJE/FnSm f9bgg4oRj4qj6Z7s5PHUYmkGYsG6Rt5SvyBiG1r6oe8IdYmKpPmBSMqlGcFbXjxbf3mHRZ TS8mPLzVot8tjRwXGG9+oLzpso9SGnI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Naresh Kamboju Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Shakeel Butt , Muchun Song , linux-mm@kvack.org, Vlastimil Babka Subject: Re: selftests: cgroup: test_core - Unable to handle kernel NULL pointer dereference at virtual address Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 22C7E160022 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: qntw35ufbzii7uywwh1nxfimd6dnnamc X-HE-Tag: 1696954597-417317 X-HE-Meta: U2FsdGVkX18TS1A6nJAzY/DjXk0xC2h3xaXHGu3h2mWy3wl3hcCjqus7QluevwsS6MdfVoAbENLvEDHa30ZWxw9R0dqgRxJdlItqVAim9LDxQ72TyiJnkP2wDmsM7cjnrrWTpp0/IfjGbvXjPoM7hT3/UaZ+hdtQwZYJFB4fbLGn5wLTHsIsulfDEQmyyMWr7PdbaBqSvuWJa53OLLdKVlRxvjk8N8Mp3ejOMSOkhEmCScYtg5upU44jSy+cOYGlXolaKDLX9i98GQTN+bJ2b3lpaiQLC1Bu+fJt2J7sHRM8ILLvsYIGdn1wzXUBCVSPzqLJWGp9yEeh2qfPhP6uYcH+1Hua09OhgXxy+NCLDMWthROL2411oWmHZQhumEkAOD10cdbvc4THvp5THb4RX2Wi3rYwjwbar7RlrEFe9gM+CISy44/Iy5eWLqI1nxIkK0oMx1aQjrYM0Ks4knMaJxXj9pDNQf8rQ9QkOdsPvrBZ4Y5vod35AA/o/S0Yf6omUZ5IHPc86GXeW6z1fyKaHEKhHzFiz6gwCsyY9cCJD58A6uIotqQVvvo++n11OS1yrlJwWhYD+icwJGNGRSNex2JBjbyWaz+xixAeb0s7Eh9cT+F6/3QOa7NVSLoFSLwP77A7BwI9Rrue7vVJkKGhrzO03xGsLmYnsgN5c23/2Fv28vqZARvgKLfHNWky8fP7xYQv4I9ep0f1m8UikGb+4/vVg79tE8iv5Iydr79+ycboJ2bosWiya8WpJflhw+j8ykph50vEb2ai3U8NXogBSwBrFf+LICcFeUdpcZ48lwzTszGaDl13jZ0e/SDX04t/UBeoftFlwPlSN8K+TWL2uIcB7IOM+TkWLlO24qpmi4yPPdTpQwq9R6mIuQQidBoCSKDCeEGQqf1vWpENTJ4eAXwyHa2xavvtYnDhN0/1XBHGTIqxHtJqEGw6D9RwbRdwFWs7lScSisNRvvXm6jD U50b4ftC 9JyFF6LpvirfcHvhnTUhd6DhwhtZaqbYdxI6Tyx+R9w9L6SWXEMOewZyoX+UF005BWpwlpDBOi+Ufm8M85J94kn6KRi3GZgHNCG0/DHu9PRCKl+pPSojD95X3fi+xw36eqeRbXrat0KzH6eQ+7sotywn6yn/9rsp1tCbtRx0Yv9hzNdKny3qzhuk7JjfYCw1NoCR0qbAFVY6kZa5SAiZvEIWL5TpCT9XljHc3qmr2UKTigeDDIsIYdrBf6wSchG1QihAYimSKmRPNUNqLIHXtLGiS3WOqbeGFFtPt 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, Oct 10, 2023 at 12:23:06PM +0530, Naresh Kamboju wrote: > - mailing list. > [ my two cents ] > > Hi Roman, > > Thanks for fixing the reported issues. > > On Tue, 10 Oct 2023 at 03:13, Roman Gushchin wrote: > > > > On Mon, Oct 09, 2023 at 04:08:13PM +0530, Naresh Kamboju wrote: > > > On Sun, 8 Oct 2023 at 21:09, Roman Gushchin wrote: > > > > > > > > On Sun, Oct 08, 2023 at 11:30:52AM +0530, Naresh Kamboju wrote: > > > > > While running selftests: cgroup: test_kmem on FVP following kernel crash > > > > > noticed on Linux next 6.6.0-rc4-next-20231006. > > > > > > > > Hi Naresh! > > > > > > > > Thank you for the report! > > > > > > > > I've tried to reproduce it, but wasn't successful so far: I've run test_kmem > > > > for several hundred times and haven't seen the crash. > > > > > > If you look at the problematic test case is > > > selftests: cgroup: test_core > > > > Ah, got it, and immediately reproduced (and fixed). > > Thank you once again for all your effort! Hi Naresh! > Happy to test anytime. > In addition to that, I am happy to test any series of patches from lore > or your tree / branch. I posted v2 yesterday. > > > > > The problem happens because some kernel allocations happen after > > mem_cgroup_exit(), which was dropping the reference to task->objcg, > > but not zeroing the pointer, so it eventually caused a double-free. > > > > I gonna post an updated version of my patchset, which introduced the issue, > > with the fix merged (and some other minor changes). > > Would it be possible to add reported by tags in your patch series / fixes ? > > Reported-by: Linux Kernel Functional Testing > Reported-by: Naresh Kamboju You totally deserve credits in the patchset, however reported-by tag will look strange in a non-fix commit (given that the fix is merged-in). This is a common scenario in mm where bugs are discovered and fixed in mm-unstable, so there are no separate fix commits. So I wonder if we need to introduce a new tag for this type of contribution. Andrew (and all other mm* maintainers), what do you think? Tested-by? Bugs-found-by? Stabilized-by? Thank you!