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 03F3DC77B6F for ; Mon, 10 Apr 2023 09:16:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 73FAD28000B; Mon, 10 Apr 2023 05:16:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6EFD8280002; Mon, 10 Apr 2023 05:16:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B73D28000B; Mon, 10 Apr 2023 05:16:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 47FBC280002 for ; Mon, 10 Apr 2023 05:16:57 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 130BB80343 for ; Mon, 10 Apr 2023 09:16:57 +0000 (UTC) X-FDA: 80664926874.06.9300338 Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com [209.85.222.46]) by imf03.hostedemail.com (Postfix) with ESMTP id 4A3EA20017 for ; Mon, 10 Apr 2023 09:16:54 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=tA3Ep3a9; spf=pass (imf03.hostedemail.com: domain of naresh.kamboju@linaro.org designates 209.85.222.46 as permitted sender) smtp.mailfrom=naresh.kamboju@linaro.org; dmarc=pass (policy=none) header.from=linaro.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681118214; 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=V0N2613pKQCAL9iN6z4rVK3cSRr5vURUZo3s2wt46N0=; b=KEor8KHmwiFDtWRg7Imck3acqFRb+Kj7mQ+lJWOuHm82DN/DYUHxuJUzjIxf2vcJGazGbt UAFLtWjN2kivD7HeQglCGwiiUZPiZvza05cymG5onHGdpQIu4s0txcYAgYaM5EMlC0Bqos yc82kU6CwJvQ9pBu5zsxVemLXSGh5zg= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=tA3Ep3a9; spf=pass (imf03.hostedemail.com: domain of naresh.kamboju@linaro.org designates 209.85.222.46 as permitted sender) smtp.mailfrom=naresh.kamboju@linaro.org; dmarc=pass (policy=none) header.from=linaro.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681118214; a=rsa-sha256; cv=none; b=kjy5S6CL4DT5AqL2nA8BcYXFdjsD3LzTI7csHaUsWlGBBaX75Awc0WSgRQMPusDHiwNDZo 8s2CMGULyOb3f1gduUC1JmYupRpQj2Rwp46TdDfYHi0G3Ekwj5Kc6LlEz+DX8Hm3jlB32+ KINFznhTl1raXc3sHEA1gU4Kh1/Vvxc= Received: by mail-ua1-f46.google.com with SMTP id e7so4570966uav.10 for ; Mon, 10 Apr 2023 02:16:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681118213; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=V0N2613pKQCAL9iN6z4rVK3cSRr5vURUZo3s2wt46N0=; b=tA3Ep3a9rR3yyVebRfsMovHLrPAK9u2+vpAAk+hkocRWd2QSGN8327+jchQXINtRKQ PQf9doLpbbJYCeEz9DkSLbrgF30UcULPcRmUFd2rh1C20Gg8/y8bI6U0+7dA4+3Io3eo ZwI/UkqTzXwSc8oFVD0OFzlYfZsR5sxiEqEH+wsA8GByx/56ugja2fvdFpDcT30WPY99 im0JWODQSSJgMc5PKKdjandlE4fFQHCZHEaX0BIhuYryqXlw1w6p6u2PvMQoCAuUFsbE yI6kOhMf817Eyw8lfNUQyVrdxDqDhsxe0s8IceUqJ7EqFAiq2EuuDVWo969434/Yt6bN AJGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681118213; h=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=V0N2613pKQCAL9iN6z4rVK3cSRr5vURUZo3s2wt46N0=; b=K8JYtxAmx6YOgNWSKVCFvgq0qWWHI6+CWiS9PxkK3j9S4kEeOwDR7zK8XCm3Z6Oqa3 gwToAxa0+8YLF+s6LoOfCJLSEEUoFhoag4xb0nm5p1bAEvmTBPHV4zBMQF+Eqh6TkCrD lMvUbDgyStVWm/tQ4y6wY1rWPIITF8vrfbubg570tYvRARP/MweXrzc+aXIVJBKmbcKR Eelw+fsYwEFQhjyPBgctAbcUMzhaAFjYolczgMSibZZsEItp028Bf/KKGCV+/6LURjQ7 iq5Pzd3I+tEkrPcpYZ0n1/eklV4sDxJWWKKtkNH1Wmz/6ZM3y8WMS3Kp0Dyedb8GwKFC u+jw== X-Gm-Message-State: AAQBX9ccX6pTi3QzS5uHNLCRk+etaoA5e31NtBsqvsh/jUmcrx3xbRzV B/CzZivbd4Gvh8A0KXoclq2iOR984WdK0byYrEHB5g== X-Google-Smtp-Source: AKy350bKBcnWH4Hp69Mt7Cjb50/39FiDV0xEAscrOKWyxOWbHlaJoMMkrFK8FZZLH2HsFkOnC0rWcfFdqMA2zez+xjA= X-Received: by 2002:a1f:270e:0:b0:43b:e059:987f with SMTP id n14-20020a1f270e000000b0043be059987fmr5467809vkn.0.1681118213114; Mon, 10 Apr 2023 02:16:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Naresh Kamboju Date: Mon, 10 Apr 2023 14:46:42 +0530 Message-ID: Subject: Re: selftests: gpio: crash on arm64 To: "open list:GPIO SUBSYSTEM" , Andy Shevchenko , Anders Roxell Cc: Linux-Next Mailing List , open list , lkft-triage@lists.linaro.org, "open list:KERNEL SELFTEST FRAMEWORK" , linux-mm , Arnd Bergmann , Shuah Khan , Linus Walleij , Bartosz Golaszewski , Andrew Morton , Pengfei Xu , yi1.lai@intel.com Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4A3EA20017 X-Stat-Signature: e9pzctkct4177j4nhcp8jsq4uqtirg5n X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1681118214-355749 X-HE-Meta: U2FsdGVkX19qEkvQ8IEJtv5kjUYf4c1YnoSOCf9jDND1p6ogpO+M1QYJe9611Q47J7nV2e9PhnCy7e4vs3orvUU7ATggiDW8SHx5tEXNSb4u7kTs46rWDCDtn8hkkG3w8mbsE14Vmhsq3dyP533U9SCA4sisS2DcDqU4LFvMriOvIiOBWjhRnvJF8/pUBeJSOq+/Z8HnJXNT+JKBbnLzE9W8uuQryl1CFabHLRvuMVoNwq9s/wqNlmVh2hCu1kBePNEeRgexN7gfr1HPls5ctJ+vL8rtf0UKiStPqo3Jj1g/YYBs38lAZokcMOTFsFwzZJ2SpbkUmGBhWUVwczKZ+Yf7pd2Tz45GK76uG1xK+NWdUDBPEL9qdAEbz3F2imZW8sZD4rYGAVPW702C7Hwbuyr7iddL+Ww/vZChlIKPFw9W/v1U0wK/sZTnsdjHHhqMglW0YDsShpSe2ZxEV5wD+J37MG9uHkTTvwI9y19u5kO4O3EoyGUCl0rLwtce6Q+c2UesOe63E9KyiwRjrsz/wID9suwew3zEiL/CRfNzx84EinRfTPRBfhqLrh+ODea9pxbVfJa3MUiIuPJE10uV+7p21C8zfemTdnpepwuWAuozoAIJ51V/sdiZT69lHii/i0PcoK6FSRMMySE1Ks56cGMlyYak6uYY3yEX8iQua5fA6wfdp4iPW1xCwmj8FjR4WL9fuk/jjTpFQEwGWH2eNSgzS7lqDL5aOUzNmA7H99BoB5gjzJ1DpdGRTeiN4OB5oGezkJO6+5Quysl5lHSz+PBdKWI8ftEGtdrvqjmQdS48R/1cc/noKHvSzxpM8eJWnrZWWwcLsrL/bqT9lpkEbXbtquh/rxjQYy+wfVB8XGArDiniybz7E7MmuGGtaen6kYESubXZVrMGq21u1Sc1pZPbgrA5WjHqav0ymcu1kG68X49xfjhZSOeuhqVSKXoav37n5vIxnsKmpLTN7Pn 3eZc4U11 AHocTbwRxpwZI6IrsDWW1FM8hdpOVtc2bIWRkGj20YimfKV7ZO3FUmmqMPWpoHWDnJMb5W+g9IsiRG1CME1kstcXocHXkMJgPsHRKT2KvmOhhxf4PwAcNjvE7TrT14Qj22x7hDpFl9ugwUAeSvuG9siFm6dek+Joshzunuu2FPeAvn5+8wIhfiRSdal1eSbWww8c21OsrZQGfhm7S5kxCzO9aL49NLDAhjwVaadCAWyxT3x03NW0Hi6iQ62QAllZ63YdDEeo3mqeaVcYNYPTqcOZujVfFgVCkQNcaBscN8mytsu2lSvQIJAKeZW2FrFQK+KMODbS3giwZ2dgH2aLzYGITs5UZsHpG0sBgTFkqMe0MhvHYwpzAD3n7vkpqY+qupoosofIGmD3XmZxFBJrydF14SQ== 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 Thu, 9 Mar 2023 at 23:20, Andy Shevchenko wrote: > > On Thu, Mar 09, 2023 at 09:33:29PM +0530, Naresh Kamboju wrote: > > Following kernel warnings and crash notices on arm64 Rpi4 device while > > running selftests: gpio on Linux mainline 6.3.0-rc1 kernel and Linux next. > > > > Reported-by: Linux Kernel Functional Testing > > ... > > > [ 61.177432] *** DEADLOCK *** > > [ 61.177432] > > [ 61.177434] 3 locks held by modprobe/510: > > [ 61.177436] #0: ffff000040000698 (&n->list_lock){-.-.}-{2:2}, at: > > get_partial_node.part.0 (mm/slub.c:2271) > > [ 61.177448] #1: ffff80000b227f18 (console_lock){+.+.}-{0:0}, at: > > vprintk_emit (kernel/printk/printk.c:1936 kernel/printk/printk.c:2315) > > [ 61.177460] #2: ffff80000b228388 (console_srcu){....}-{0:0}, at: > > console_flush_all (include/linux/srcu.h:200 kernel/printk/printk.c:290 > > kernel/printk/printk.c:2934) > > How is it related to the GPIO? > Can you bisect if it's a regression somewhere? The following crash on Linux mainline and next was noticed while running selftest gpio on arm64. And this is a kselftest-merge config build. Which means it has a large set of test configs enabled. Anders performed bisection on this problem. The bisection have been poing to this commit log, first bad commit: [24c94060fc9b4e0f19e6e018869db46db21d6bc7] gpiolib: ensure that fwnode is properly set Reported-by: Linux Kernel Functional Testing Reported-by: Anders Roxell Crash log: # 2. Module load error tests # 2.1 gpio overflow [ 88.796755] ============================================================================= [ 88.806704] BUG kmalloc-512 (Not tainted): Poison overwritten [ 88.812482] ----------------------------------------------------------------------------- [ 88.812482] [ 88.822170] 0xe38-0xe47 @offset=28216. First byte 0x6a instead of 0x6b [ 88.830994] Allocated in swnode_register+0x40/0x218 age=828 cpu=2 pid=565 [ 88.837830] __kmem_cache_alloc_node+0x11c/0x320 [ 88.842480] kmalloc_trace+0x54/0xa8 [ 88.846083] swnode_register+0x40/0x218 [ 88.849947] fwnode_create_software_node+0xcc/0x1a0 [ 88.854856] 0xffff8000018c71cc [ 88.858029] 0xffff8000018c73b0 [ 88.861197] do_one_initcall+0x80/0x320 [ 88.865062] do_init_module+0x50/0x210 [ 88.868843] load_module+0x201c/0x2260 [ 88.872622] __do_sys_finit_module+0xb0/0x138 [ 88.877010] __arm64_sys_finit_module+0x2c/0x48 [ 88.881572] invoke_syscall+0x8c/0x120 [ 88.885352] el0_svc_common.constprop.0+0x104/0x130 [ 88.890263] do_el0_svc+0x44/0xb8 [ 88.893606] el0_svc+0x48/0xb8 [ 88.896686] el0t_64_sync_handler+0xbc/0x138 [ 88.900984] Freed in software_node_release+0xdc/0x108 age=34 cpu=1 pid=683 [ 88.907899] __kmem_cache_free+0x2a4/0x2e0 [ 88.912024] kfree+0xc0/0x1a0 [ 88.915015] software_node_release+0xdc/0x108 [ 88.919402] kobject_put+0xb0/0x220 [ 88.922919] software_node_notify_remove+0x98/0xe8 [ 88.927741] device_del+0x184/0x380 [ 88.931259] platform_device_del.part.0+0x24/0xa8 [ 88.935995] platform_device_unregister+0x30/0x50 [ 88.940730] 0xffff8000018a1dd4 [ 88.943898] __arm64_sys_delete_module+0x184/0x328 [ 88.948722] invoke_syscall+0x8c/0x120 [ 88.952502] el0_svc_common.constprop.0+0x104/0x130 [ 88.957413] do_el0_svc+0x44/0xb8 [ 88.960757] el0_svc+0x48/0xb8 [ 88.963834] el0t_64_sync_handler+0xbc/0x138 [ 88.968132] el0t_64_sync+0x190/0x198 [ 88.971820] Slab 0xfffffc00209d0800 objects=21 used=7 fp=0xffff000827423200 flags=0xbfffc0000010200(slab|head|node=0|zone=2|lastcpupid=0xffff) [ 88.984653] Object 0xe00 @offset=28160 fp=0xffff000827423200 [ 88.984653] [ 88.992953] Redzone [ 89.002470] Redzone [ 89.011986] Redzone ... [ 89.278435] Redzone [ 89.287951] Redzone [ 89.297468] Object [ 89.306984] Object [ 89.316500] Object ... [ 89.592465] Object [ 89.601981] Redzone [ 89.610801] Padding [ 89.620317] Padding Details test and crash log: - https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.3-rc6/testrun/16155019/suite/log-parser-test/test/check-kernel-exception/log - https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.3-rc6/testrun/16155019/suite/log-parser-test/tests/ - https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.3-rc6/testrun/16155157/suite/log-parser-test/tests/ metadata: git_ref: master git_repo: https://gitlab.com/Linaro/lkft/mirrors/torvalds/linux-mainline git_sha: 09a9639e56c01c7a00d6c0ca63f4c7c41abe075d git_describe: v6.3-rc6 kernel_version: 6.3.0-rc6 kernel-config: https://storage.tuxsuite.com/public/linaro/lkft/builds/2OCXLSEmqxrg13KKFGzypngoE3K/config build-url: https://gitlab.com/Linaro/lkft/mirrors/torvalds/linux-mainline/-/pipelines/832195018 artifact-location: https://storage.tuxsuite.com/public/linaro/lkft/builds/2OCXLSEmqxrg13KKFGzypngoE3K/ toolchain: gcc-11 email-notification: '' build_name: gcc-11-lkftconfig-kselftest -- Linaro LKFT https://lkft.linaro.org > > -- > With Best Regards, > Andy Shevchenko > >