Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp543273lqr; Wed, 5 Jun 2024 13:27:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVQt41khV5TH/BI64H0Xt11+ScgLASOKoSxYpydf5uQmkkYmirkYbkbqOBHD/jRaLBEANcDA7mkbzudSp8zyhHV+Y5jKmiaUDPYvdVIIA== X-Google-Smtp-Source: AGHT+IErjoVpU47l4fxon31m64sqLkmOJGqoNCokN8/cgkdpMrscRStwKOxa7FibhKeFBTAqjMpH X-Received: by 2002:a05:6000:b81:b0:34d:7a12:454b with SMTP id ffacd0b85a97d-35e883386bcmr2625021f8f.39.1717619245529; Wed, 05 Jun 2024 13:27:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717619245; cv=pass; d=google.com; s=arc-20160816; b=OXFGRjeTI8MB5xih2taQuweJ8oavf2icpHQSWQc5AGCFUD2kVfjvpxE/vgAUjZ9xTP yVJlPmz4/OdwBEDzuzZdmoiqlnAM9I7xkMA+wJ6wrpTAMi/MH6nIg2ucbN3cMtFpRrZB +lNspLPawqalA67hjRB7k67nuM/tbZzW38/xhm5KDwNyoGZ0+9f90oe9205wGUR6tiL2 vPQWB9azQ3B9RqC3nCYhr2ATmeVSTafgh6zULME/lZRZUAS6GDdpWh3lUQZpz4bhBuG1 kSvdYZlhLUkftx9PfgG9ixj9kVpGDYb+a1lbx7DIXDkpNVw3BOCY7l/gOehqFqrcQrUB PI7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:subject:cc:to:from:date:user-agent:message-id; bh=pcK+mhYL4PdUvw/9v6qWeqbyxwA5U5Q0I5hQhIei6Ek=; fh=mjDKelfe6UwtrbrQsWTm6mHxXqJJm1yC7XMGoQRRIY8=; b=P+Refs1FqaDhk3LGTgmK5kf8GbRhwEYNl6MH7NlMGIx5ufLoScrqDADUoeC2wcBIjn 8O8bwNKgSE8yAkgnH7PrGqOaQD596Se73IoFoxX+h4yOtK3iogEUiDSBPL14IaQeyQlx LW1ltHyOUkW/FK5FddZNdDPY67EPjeoF+kBMZcKLIf/qGD403h4wIBs9DQ++mpto4n7v +HJN2hmgckAa5zSgdJE7C+szwVVQJ406vwQH1TC8X9/C5QhCPu0BsgH2Bh7mnTIEAeIa 3gx7I7jNxxb+fumk47Tnt1JcFbCnzRMPwuhvFRjW7KqULz0wcGROUnCbaEcc78Sxn1IL JH9g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-203173-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203173-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68f828255esi384670666b.910.2024.06.05.13.27.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 13:27:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203173-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-203173-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203173-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 426611F247CB for ; Wed, 5 Jun 2024 20:27:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 76CB415EFA1; Wed, 5 Jun 2024 20:27:06 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC1EF15ECCD; Wed, 5 Jun 2024 20:27:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717619226; cv=none; b=AhOpfdDWj8nEPMwwQDB52UiWrU4RBvV477b6MNorzBMmv8q8/iZ/7UmKIzGm3WL+tYONXp1UhGXS8GSdYb+D8OY+T/LgsDRropWPMSGTnhuUZlRMv3kHY+yuzciSYjSK3H2mEWWTkQ9vf9j903dFPII/90Kaa/s/ZTupYZW6hcY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717619226; c=relaxed/simple; bh=jnHREzsc8tpTaQNkMJMt6pd9c2rlI6DKzyKGBlZBgRM=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=rUAJA+XzHHNLkPvVSTtT4FX7MFnNZQ7n4I8WS1Xnd8jaNpLQYpMG6t+pxGb4NBZUeb9DXbUkXeywfIxDQHwBcukkmKrki1Oy7kw3Hj82GBAuvqzCoYHonFiEU6EjZx1dDCp8uYUumu2YL03AeYZ8xjRdNSEd+f9q7Ww3tJHv3Z8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B290AC4AF0A; Wed, 5 Jun 2024 20:27:05 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1sExDw-00000000i7u-39u8; Wed, 05 Jun 2024 16:27:08 -0400 Message-ID: <20240605202708.613471310@goodmis.org> User-Agent: quilt/0.68 Date: Wed, 05 Jun 2024 16:26:47 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton Subject: [PATCH 3/6] ftrace: Assign RCU list variable with rcu_assign_ptr() References: <20240605202644.293295925@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 From: "Steven Rostedt (Google)" Use rcu_assign_ptr() to assign the list pointer as it is marked as RCU, and this quiets the sparse warning: kernel/trace/ftrace.c:313:23: warning: incorrect type in assignment (different address spaces) kernel/trace/ftrace.c:313:23: expected struct ftrace_ops [noderef] __rcu * kernel/trace/ftrace.c:313:23: got struct ftrace_ops * Signed-off-by: Steven Rostedt (Google) --- kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 3af0b1feb873..a39842a53444 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -310,7 +310,7 @@ static int remove_ftrace_ops(struct ftrace_ops __rcu **list, lockdep_is_held(&ftrace_lock)) == ops && rcu_dereference_protected(ops->next, lockdep_is_held(&ftrace_lock)) == &ftrace_list_end) { - *list = &ftrace_list_end; + rcu_assign_pointer(*list, &ftrace_list_end); return 0; } -- 2.43.0