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 A059CCD8CAC for ; Tue, 10 Oct 2023 17:22:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 20F118D00C9; Tue, 10 Oct 2023 13:22:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1BE678D0002; Tue, 10 Oct 2023 13:22:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 087078D00C9; Tue, 10 Oct 2023 13:22:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id EA9F88D0002 for ; Tue, 10 Oct 2023 13:22:38 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 9E532A0265 for ; Tue, 10 Oct 2023 17:22:38 +0000 (UTC) X-FDA: 81330221196.13.67F1560 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by imf27.hostedemail.com (Postfix) with ESMTP id C6A5B40005 for ; Tue, 10 Oct 2023 17:22:36 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=1OXGSrmW; spf=pass (imf27.hostedemail.com: domain of shakeelb@google.com designates 209.85.214.170 as permitted sender) smtp.mailfrom=shakeelb@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696958556; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+OWohB1ugu2FpCEkamu58GPh1OuKCRzGNS7naDg8oBc=; b=ygVoplsUYtvbrPnZjDB122Cy9JJsX6Sczieu5JFyX3e7+REtZ855QT/uzrgEWPM/eQGTV0 q2lX7Y0Kk6ya/3trmblAiRfb2si+mfxBj5gNoGj4Ofu9YdjNvi0x2kJaIoIrFa5xpySM6/ CMlNOrv5ygPNDb0ezSqemYFcztQwxDE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696958556; a=rsa-sha256; cv=none; b=ZjaGSZWfu8g7Afm4dpy7o697SRqe69MdRkOGrs3TylOUOjFIOkSn2Ec7c3jLefQoKegCiu MxeS6WxizbwVxiz0UIlOwVpkNV0NKDmnmWAoYPjlOx/MdQq5ZGYDIdPoc1yBrWTaZrv97j Lw4g6XmN/W4ROXWLmRrjzpwVqHTc4J4= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=1OXGSrmW; spf=pass (imf27.hostedemail.com: domain of shakeelb@google.com designates 209.85.214.170 as permitted sender) smtp.mailfrom=shakeelb@google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1c9c145bb5bso8175ad.1 for ; Tue, 10 Oct 2023 10:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696958555; x=1697563355; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+OWohB1ugu2FpCEkamu58GPh1OuKCRzGNS7naDg8oBc=; b=1OXGSrmWWf9yG73Qpi5dQYBK92TvRFF60fAIdd0e1ZTILUb8M072qccDwdH49YYDEM cgNRNJntaBFO5XRRGwC+SFBUbsBWXtD9ra67ACxeAXcXl/XeCBgOCi8iXLnFrLuZjFWT NENJnrJfIIm/Hrs7/3NUYulknHARQgyVh6eg3H91hC6jgpkTTnNor7B0/78PtPipf84B MkY0uM+JjQTITJNrb9CkqR5ffU/5P7kG5htSle8FtTYSlmm8TlmYigmAIW5GAc3D+kgM g5sEbwza6Ws1npD+wyrHtn47yzeMDvkHwxTh1lMiz7jBfWTNl7cToAktWJiUVtZ/URFV tLNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696958555; x=1697563355; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+OWohB1ugu2FpCEkamu58GPh1OuKCRzGNS7naDg8oBc=; b=EJSikaneWDASqytHbxN3/Ha7xaj2T+pdbkz6thnzEnK2zsfx4ygGqozFJj0GcpGXdJ SHUbzCKceVxeT7GXf7sRpDpdlgAB6BO4y5T0ojofFM+gvn2SbdBoyIiUTcpZxyXc/lhz edsLAl6f1CG/HnqpuZ8zZBcmXvBEr9rfiWE2FxHsMe//IaOd2tNfUsGAbL+queBMfjoX I3ofvefvp7vc01eOOqnJ5l+d1YSJN0VOpLDhIDIfdXHib0hSYz6p/KkE1GXGneGTaITV YfXqapAzwsSvNbs/gbCohtnr+xT4Hx+b5gdF4KMrtVqDBIEzw2pRcgLuM4HEO4uCvz1p NLkg== X-Gm-Message-State: AOJu0Yy7hir08P89nq+4ZP6BHF8QPfQwbHqwlHc59TASYu2Shz+tlPk4 PCvL0LWDVUJ8uody0dvaS4GGK43hSywrlvgmAYhKxg== X-Google-Smtp-Source: AGHT+IHY5y7T1WBWH4h9aRaxY/hI0GUdOxnMp0mbehxj0NRg0srEFRV5DL0LbBJB6cbSyzmWsOLqvIzSL5vxFolUEbg= X-Received: by 2002:a17:902:dacd:b0:1c6:c41:679c with SMTP id q13-20020a170902dacd00b001c60c41679cmr18743plx.4.1696958555211; Tue, 10 Oct 2023 10:22:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Shakeel Butt Date: Tue, 10 Oct 2023 10:22:24 -0700 Message-ID: Subject: Re: selftests: cgroup: test_core - Unable to handle kernel NULL pointer dereference at virtual address To: Roman Gushchin Cc: Naresh Kamboju , Andrew Morton , Johannes Weiner , Michal Hocko , Muchun Song , linux-mm@kvack.org, Vlastimil Babka Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Stat-Signature: z6qgyf8yatyufz4jmh8qrqwgk5utcosn X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: C6A5B40005 X-Rspam-User: X-HE-Tag: 1696958556-3796 X-HE-Meta: U2FsdGVkX1/PPlBg31I7+MLnMci/ae/58qbzdFcFV/8h3xpN8QXP4SE8hrmguNFW+Qy/1o29AIiwxZn623WxjqC1HLDAVtlnjNZjvB+estGiuFnzem6bgptnQI5rdhJc1DZChlL+90Wnv5UaGV3v5Tz3lXIlBKCOBTGjbMiVuhj2OLp/q7GydgK1OVJXiGz3At9XEMjwdxgtNDNhMV/w6KRpRyB64MANvK9RQWteLM+o7ahWpiNckevXqv7VPESKVYPSt7zrVdQBpkMAnd9wnatJEdWZyFG6+ATZaI+Suqh8Mk00BjphTru/3Hz9BB6IwTBeBDQE0zRa0gO6fhk+xxh+GikC2rvlLyiDp8qNQQlmZ0f6q40iiny+6xnWbTHXnmKn5HLD1NNJlUz4b7tbwT0+QV0o1G4WigIj2Y9NqdUHCRMgSQWeAu3W6/qWNlzsZMtDPNV7ik0sDS6Wou9Br1PpwavB3sz9SzShgapMHIkvLSdW6sYMSdZq4DtRiT7Bp4C8k808BTBY4Rptm1+ijoKePAyczSmNnr44NDq5W+tAfXoV/Mc55dZYjwjlopey6/DI65E7dWUNf+8W/hTW6krddF3nI0i6EG1LE7y2jpI8EhIsxMbL0XFXnVR37PQd7RSqLgF0FuhT+rO0sbY+F4Vs9a+A8o60yFrhRDfkWVmIwUZxN01jnl5MLdb1gR4J5oF760vAOQmIxyHfmMrjEnhD6aO1nLF++dBvb5JfzRef2MLTCoHRB408mVg7w5u9pPuwlSIoXeusajHEENZ4Td5SLST23Hh3xG3qNkfooza6+OvggJsCDSGGuh9tynw0okfKFhD5TJ/lKrcjJUdLNpSMCrCQfn3b19RmctWWnOX0jNZB4TsGmSkrEF4RGxzUWi8JEKneOC/SHH+aM90xTWCuYigbYOnXFHOowiILZoYXH4s3BXKEXdHuNY3J0w/yG0VrACbz9Nin+o/FJy5 XCD9GETk HiwKDl1HveZzWPNTX12J7Cqo4mqcFOt75Hr1RrAFCL2N7UDIUpC7yDXcqznxSigsBpKAQfW3bt4r6MKkiXaBXaAzldPN6SsUvj0kuyC0KX8Ckpu3/H0VH5OlpToamE1+a59K0wm67tm17zA8pmXtDSebQEH1Bm8uGjY6FZw7sLa1xtzjBYBFymVykqNvwt8lGKQKVqiUt7+Su5V7CnIJCEYU2Mmtf0Id1yzR5neL0xiWQ/dl5mrt0BxR2k49uxDuXI2JCnf2Cmtfj5d2SOWxFpjDlMwNfc1mnJeaD7lOVsIjkql6R6Ge3lpbBxT7c2k575KC7YnJw5qq+b7Ov8XlzWytTnbLvUZumCxPautTLLh+4kLukC/mISGhxmQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, 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 9:16=E2=80=AFAM Roman Gushchin wrote: > > 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 ker= nel 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 ru= n 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 / fix= es ? > > > > 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? > "Tested-by:" seems reasonable. Is there some automation looking for "Reported-by:" for backports or contribution stats?