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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6FB6C004D4 for ; Sat, 21 Jan 2023 16:49:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229714AbjAUQtL (ORCPT ); Sat, 21 Jan 2023 11:49:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbjAUQtK (ORCPT ); Sat, 21 Jan 2023 11:49:10 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF2D128D27; Sat, 21 Jan 2023 08:49:08 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8A819601BC; Sat, 21 Jan 2023 16:49:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00EF2C433D2; Sat, 21 Jan 2023 16:49:06 +0000 (UTC) Date: Sat, 21 Jan 2023 11:49:04 -0500 From: Steven Rostedt To: Peter Zijlstra Cc: kernel test robot , oe-lkp@lists.linux.dev, lkp@intel.com, linux-kernel@vger.kernel.org, x86@kernel.org, Ingo Molnar , linux-trace-kernel@vger.kernel.org Subject: Re: [tip:sched/core] [tracing, hardirq] 9aedeaed6f: WARNING:suspicious_RCU_usage Message-ID: <20230121114904.13d6825d@gandalf.local.home> In-Reply-To: References: <202301192148.58ece903-oliver.sang@intel.com> <20230119112433.611fa273@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-trace-kernel@vger.kernel.org On Fri, 20 Jan 2023 10:51:18 +0100 Peter Zijlstra wrote: > > does trigger the issue, you can then bisect the functions with the script: > > > > scripts/tracing/ftrace-bisect.sh > > Pff, that all sounds like actual work :-) > > Instead I did me the below hack and added my early_printk() hacks and > that got me a usable backtrace. Well, if you system is still running after the issue, then sure. I created this when it would cause a triple fault reboot. In which case, there was no real debugging output to use. -- Steve > > diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c > index 5e7ead52cfdb..7defc6e24f8f 100644 > --- a/arch/x86/kernel/ftrace.c > +++ b/arch/x86/kernel/ftrace.c > @@ -646,6 +646,9 @@ void prepare_ftrace_return(unsigned long ip, unsigned long *parent, > if (unlikely(atomic_read(¤t->tracing_graph_pause))) > return; > > + if (WARN_ONCE(!rcu_is_watching(), "RCU not on for: %pS\n", (void *)ip)) > + return; > + > bit = ftrace_test_recursion_trylock(ip, *parent); > if (bit < 0) > return;