Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9080522pxu; Mon, 28 Dec 2020 06:10:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/YbTbJssVOpXKBjIkBrTNDOsQZ7ycYukdljHJxNJ1q/pFaghYpFuqy3DPt1ec1z101Dnf X-Received: by 2002:a17:906:9345:: with SMTP id p5mr41080100ejw.40.1609164619534; Mon, 28 Dec 2020 06:10:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164619; cv=none; d=google.com; s=arc-20160816; b=ZO99Kt0ot1tY5PHpeyX73aGtUHFpZG5FrVeOaVwhSbIcwLAPX5Htk1PyE6EiXjB/f0 tlf/E6Ypuid72SBVG1Qe5nMvTg/nkkaOBa3yH1GMCylO3Qd3mIBFwJTZD7PEFhtzQdPF JYPXSLvXEUlrGpbj7zB+qQ2xsf1xT9EhftjEnxGxFBun7TMRgTJf3VaK6w6jT/JKlqDR JfmxhoWU5kDaljnZGxBuBge2jqsAn+Qw4gpnyIuGvw3Q7EzPO2EjxHOW6LbOpPVlqGA8 rmuW4EwEeoYXV2Wvn98CKTHdOqml8fs6XQUi2rY7TRWjURTBzZ2R/RaLk/pMdVSNi5q4 pXMQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=s2g9fLJEGjfEYarhj1GNKlyLBmkhcMHCrM6eBnWGRJs=; b=lo0vmLsTMyXW17evP/FBONVGIzch6I5zeGFoCu8Qvocj4ruDl6QG7yfsr6SHTaVPIJ smBPLecSd/EZ78hyomYdWKOY5mVqWJbDggH82k5SpfDanxHN3iBKgGT9biASaXpAhbX1 YDfu4blSGTxk1cnaftbGdYLPkPi1MmdhIsfNyOd7W5WinMpEuJadsOQ0vdCceFT/bQRM Z9UjNawd9aUF/98shj5IzuA3y7OeaGWnQvjGMtCPQwHTaCj46n6WbMYmHjgO22QKbMVp krsFhtvuqUm5LvtMrNUBCsCsBY/VZCYDvD3+7H3i/eJT9YyKP8f4Q/w4/DLZrLrQvbA4 ELaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n2KHqS7j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si18440568ejr.2.2020.12.28.06.09.56; Mon, 28 Dec 2020 06:10:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n2KHqS7j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438451AbgL1OH3 (ORCPT + 99 others); Mon, 28 Dec 2020 09:07:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:41714 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391702AbgL1OHZ (ORCPT ); Mon, 28 Dec 2020 09:07:25 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8F583207AB; Mon, 28 Dec 2020 14:06:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164404; bh=IF5gIABbZd5/ffjrnxQ1CF9OCFUMmkAf++QrNYLfP0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n2KHqS7jmS58eU3z5R5SPgNNKffmQyuYX6iJlhx9kB9svTAgqi4zXmn3lmg5DC3RU twa9yKF9PDKlAeGw236mWGy1SxurVF2iCLMon/1RNFAfMzBwN8kZ5vNNZW++twv7bC qQpNjtEM+vjT2+YpaXHb3nDepLq7qIdRhVG18QZ4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kim Phillips , "Peter Zijlstra (Intel)" , "Paul E. McKenney" , Sasha Levin Subject: [PATCH 5.10 168/717] rcu,ftrace: Fix ftrace recursion Date: Mon, 28 Dec 2020 13:42:46 +0100 Message-Id: <20201228125029.005848859@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Zijlstra [ Upstream commit d2098b4440981705e844c50254540ba7b5f82795 ] Kim reported that perf-ftrace made his box unhappy. It turns out that commit: ff5c4f5cad33 ("rcu/tree: Mark the idle relevant functions noinstr") removed one too many notrace qualifiers, probably due to there not being a helpful comment. This commit therefore reinstates the notrace and adds a comment to avoid losing it again. [ paulmck: Apply Steven Rostedt's feedback on the comment. ] Fixes: ff5c4f5cad33 ("rcu/tree: Mark the idle relevant functions noinstr") Reported-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Paul E. McKenney Signed-off-by: Sasha Levin --- kernel/rcu/tree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 655ade095e043..585bf112ee08d 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -1093,8 +1093,11 @@ static void rcu_disable_urgency_upon_qs(struct rcu_data *rdp) * CPU can safely enter RCU read-side critical sections. In other words, * if the current CPU is not in its idle loop or is in an interrupt or * NMI handler, return true. + * + * Make notrace because it can be called by the internal functions of + * ftrace, and making this notrace removes unnecessary recursion calls. */ -bool rcu_is_watching(void) +notrace bool rcu_is_watching(void) { bool ret; -- 2.27.0