Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp332352lqt; Thu, 6 Jun 2024 05:14:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/zkzToyrtALIA4F+3NGoluz5g2XOZCdDME97RsUKTh4LNe9fjRn2LtgNSZNrwtFcmbN7QgF7S3XZ3Of7uxfDRzVB/eMnr1w+1ffnPBg== X-Google-Smtp-Source: AGHT+IEKSvFH+QlhnZEFNacBb/E/bMo8fiVFsyjptsjLcPxUqq6FdVtN3J4F4ubzE/JrX2Fb49J1 X-Received: by 2002:a17:907:544:b0:a59:e52b:39dc with SMTP id a640c23a62f3a-a69a0000be7mr347362666b.67.1717676080498; Thu, 06 Jun 2024 05:14:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717676080; cv=pass; d=google.com; s=arc-20160816; b=fQQ7tVXQa8s9iRaFAPE4BFnZoyA40MainLY9nm/d0Aw3Ncd9fwRFHfdgte3GE6ItRC FqUzW3Yc0dHuPdtY/Ka8jnUrW2AgITWeDYY+XQl0LORe6C0lh3Gu9hqfUWU3LDKztGHY es5Mk4cCx2GwpUII1k3bXPiu9AaSIp9h4TpHWh/NNhxxYMKCrSXITNwFqfzKI3hV60yG r5Dznmr8dvh9sKJ6+FCg6pEVDV1QqUEQcjr4GD5CaXhFEi2doPjhK1e692jyiMoWIoxU EHfHQpSvDV6crLcwe1kM63Va0lDm9jhtBYEzWgIhIBEVtSqs5w8H5bV8w+VlKTkfgzlT PH8Q== 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=nmE+z0DaiTLJ11ORFUXPHrx4pzGPfv8zHbGjkvigylA=; fh=mTYg3JJ8i2GBNLFt8qb4bgYwOyk0kmrOzICLbi6qJ1c=; b=zPSMZ78MO0eD7AFFAomCa663BSnJlHW3/YDYua1u9jroqBBisLraWYrG0W6XgWYWVJ Jcln7SJT1b9+AAkluw4P+fyV8fh+RCga+UfM9TLippipdBCMo58WEGYwNu24mN04Wi+M zzIWnFNkFJc+e6Cuni+sxR/DkFg9qB9v/xXPTDNtWJcvi1VgkXKtSH6ICNdOYYbt/Ciz AW95KpVG4Bb3wpaNZjqCbbwGUGqCWZ6Z+PlVoLvxDgFLmdXvfMGr1gxoH3eV4sar6pYA sB9J9xYFaEWV2TkivR4avATmMR/oJsd3mRMpDTb12THY+ZQLsMsdA3O8zF3OY9BSkGM4 1psQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-204250-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204250-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c8074a512si66654366b.951.2024.06.06.05.14.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 05:14:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204250-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-204250-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204250-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 12E6D1F25A45 for ; Thu, 6 Jun 2024 12:14:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B41FE195F3C; Thu, 6 Jun 2024 12:11:03 +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 AB3A3195FD9 for ; Thu, 6 Jun 2024 12:11:01 +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=1717675861; cv=none; b=b7GijvImqRRsC221s/LHHd8VzashDopQ7blopQ4wrS/vUbVVzjLHqUjsF6j49s2Wp4CxargN8wsPEe1cbZIh5NmLZJcdk+ilml03PTHFXEWt/TcQeRAcuP9gxjyUbTcHg18dLLZ765UpoU9cjI+AitDX0UimESGuIABcayA2obw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717675861; c=relaxed/simple; bh=HjlzeB6C1CgYsE+B087pV2CKhW5luo4DRzutqhcqgpk=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=i369FUzWJdJUIFCVzBpPjdTgTr+FKlsXqq68NrTA03xBhLu/GpZfnCU9ARRvMJO89RYGWo8bAAtkaLNHCsSGuocV83iIOkfI7IrPePu72/+mXmgLJBg5Yr3/fwL2AL2TbbiwEGxl/6tX1U9sk9ylR/UcAWzqalMqjzsEL6Tfivg= 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 9486EC4AF5F; Thu, 6 Jun 2024 12:11:01 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1sFBxS-00000000nNK-0Vu2; Thu, 06 Jun 2024 08:11:06 -0400 Message-ID: <20240606121105.987880939@goodmis.org> User-Agent: quilt/0.68 Date: Thu, 06 Jun 2024 08:10:14 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton Subject: [for-next][PATCH 10/15] ftrace: Assign RCU list variable with rcu_assign_ptr() References: <20240606121004.857581251@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 * Link: https://lore.kernel.org/linux-trace-kernel/20240605202708.613471310@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Acked-by: Masami Hiramatsu (Google) 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 034242675e7b..4aeb1183ea9f 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -311,7 +311,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