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 CD983C77B71 for ; Wed, 12 Apr 2023 08:45:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230178AbjDLIpF (ORCPT ); Wed, 12 Apr 2023 04:45:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231232AbjDLIot (ORCPT ); Wed, 12 Apr 2023 04:44:49 -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 B3D6A869B for ; Wed, 12 Apr 2023 01:44:26 -0700 (PDT) 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 139FF63093 for ; Wed, 12 Apr 2023 08:44:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C6DFC433EF; Wed, 12 Apr 2023 08:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1681289053; bh=nynBZg6qn44ZvCVlDDtAdnoLQAzHBlyTyxRwBhms3lM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cu53v5fyiOF+X4t+LkF0zsJG6IV8wHTsA0Dej7vBu5iC+fiyc+K2qWCsoPJ2xm44S 1vVpdK7YawY4oVmCRPArykREWxsURUX62mKfDJscPvuFYrTiIOG1DpC1bVi7RUYUpD SjzGikL48NZlZHFaqFm643f/soXPkLUaJDMveAfo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Masami Hiramatsu , Mark Rutland , John Keeping , "Steven Rostedt (Google)" Subject: [PATCH 6.1 111/164] ftrace: Mark get_lock_parent_ip() __always_inline Date: Wed, 12 Apr 2023 10:33:53 +0200 Message-Id: <20230412082841.331905436@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230412082836.695875037@linuxfoundation.org> References: <20230412082836.695875037@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: John Keeping commit ea65b41807a26495ff2a73dd8b1bab2751940887 upstream. If the compiler decides not to inline this function then preemption tracing will always show an IP inside the preemption disabling path and never the function actually calling preempt_{enable,disable}. Link: https://lore.kernel.org/linux-trace-kernel/20230327173647.1690849-1-john@metanate.com Cc: Masami Hiramatsu Cc: Mark Rutland Cc: stable@vger.kernel.org Fixes: f904f58263e1d ("sched/debug: Fix preempt_disable_ip recording for preempt_disable()") Signed-off-by: John Keeping Signed-off-by: Steven Rostedt (Google) Signed-off-by: Greg Kroah-Hartman --- include/linux/ftrace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -943,7 +943,7 @@ static inline void __ftrace_enabled_rest #define CALLER_ADDR5 ((unsigned long)ftrace_return_address(5)) #define CALLER_ADDR6 ((unsigned long)ftrace_return_address(6)) -static inline unsigned long get_lock_parent_ip(void) +static __always_inline unsigned long get_lock_parent_ip(void) { unsigned long addr = CALLER_ADDR0;