Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5794613rwp; Mon, 17 Jul 2023 09:30:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlFQJaqt7vaq1joO/G4l+MjOnHsySiJg7kH14nlmprlZ6L/MTocY0y0FSXYUl0/SU5qyRtWA X-Received: by 2002:aa7:cd52:0:b0:51e:3558:5eb6 with SMTP id v18-20020aa7cd52000000b0051e35585eb6mr11702917edw.3.1689611418941; Mon, 17 Jul 2023 09:30:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689611418; cv=none; d=google.com; s=arc-20160816; b=eBCELHhAOpXIV4K0dymW097dX1c1AW8fluzItZRhdKnPR+wRqNALCvmzwF9D8kvmIA U6CpPGJKJamMyhr6t+Dabmh3FguuNkMtvzqRtr8NwASga3I+gUDCe6hfX0M/2Ajag5oa AHkbre5JZuHjPPfcF69u8P8Xc1tRxrHR7O/wyPAXxD6mTp4+2mnooFOL+N2Y1RRKSw80 vs9Sb+N5rERA1j7BtigBlYswuTsyu9ALee5Zvx5VDiRm4o1iV2NRyfZ/FrkQM+myJORp Zz6LMUYVTzcwQo7ycZnGIbPMJER4amsoC9BhbxpobhkyogtmWu3Ue7ZOCETuuqrUW0qc WkJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=8Ipsl/UBdtN4WMx2LX1Cb5D+wSesgPObf9rlGnmWbvw=; fh=QBaw3OmnTRHp1nlSMF10+OgC+CPrgZr4bnD2osFX91c=; b=SRW4Sebz3jDbUcb6LPGs0+PJYqeoAp6oEqhW5skETIpJk/bgfd2RmY2qlH3oTO8wUj lroTedULGjSa+ZKSA+4/LDKdxsgsJ0Y/1PpKy5w5SsBIwtKT0F1TGh6fRQggjKohtyBB 7d06EoHA28Ps7i/DclHMadepiCI88mt7oef62jJAw7kAc7rzS6fGWLp0mZHihAwNTTuq kQh8VQfXuRMir7nIFtDmcg6mMOBehRAZx5Dil+rznGTX8oVpPdgUmW/9wkhlFLsgErJ/ LbJo45kZXunlJvTgtnfoBhZW+kRiL9D7wON4lGgFuRx65dGCysZVXx4lWlbNuTt45/aq 7Bqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i10-20020a50fc0a000000b0051bfc119d36si3944678edr.85.2023.07.17.09.29.54; Mon, 17 Jul 2023 09:30:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231744AbjGQPWS (ORCPT + 99 others); Mon, 17 Jul 2023 11:22:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231965AbjGQPWF (ORCPT ); Mon, 17 Jul 2023 11:22:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5C38E7F for ; Mon, 17 Jul 2023 08:21:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 85E526111D for ; Mon, 17 Jul 2023 15:21:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FEA2C433C8; Mon, 17 Jul 2023 15:21:41 +0000 (UTC) Date: Mon, 17 Jul 2023 11:21:38 -0400 From: Steven Rostedt To: Cc: regressions@lists.linux.dev, bagasdotme@gmail.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org Subject: Re: radeon.ko/i586: BUG: kernel NULL pointer dereference,address:00000004 Message-ID: <20230717112138.1fd48cca@gandalf.local.home> In-Reply-To: <230715113911.M0124687@vega.pgw.jp> References: <20230714100019.6bf9b1ab@gandalf.local.home> <230715113911.M0124687@vega.pgw.jp> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 15 Jul 2023 11:39:11 +0900 wrote: > Yes, this is puzzling. That's why I need other people's opinion on this. > Does it matter the DUT is a slow machine (Pentium 120MHz)? > Hmm, I wonder because the workqueue is running __init functions, could it possibly be that it didn't finish before the end of boot, where it frees all the functions? It shouldn't do that because there's code to make sure it's done before it continues further. But just in case something isn't working as planned, you could try this patch to see if the bug goes away. -- Steve diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 05c0024815bf..af5a40ef3be4 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -3771,13 +3771,13 @@ static int test_for_valid_rec(struct dyn_ftrace *rec) return 1; } -static struct workqueue_struct *ftrace_check_wq __initdata; -static struct work_struct ftrace_check_work __initdata; +static struct workqueue_struct *ftrace_check_wq; +static struct work_struct ftrace_check_work; /* * Scan all the mcount/fentry entries to make sure they are valid. */ -static __init void ftrace_check_work_func(struct work_struct *work) +static void ftrace_check_work_func(struct work_struct *work) { struct ftrace_page *pg; struct dyn_ftrace *rec;