From: paulmck@kernel.org
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
mingo@kernel.org, jiangshanlai@gmail.com,
akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org,
"Paul E. McKenney" <paulmck@kernel.org>
Subject: [PATCH tip/core/rcu 5/8] doc: Update RCU requirements RCU_INIT_POINTER() description
Date: Tue, 5 Jan 2021 16:54:04 -0800 [thread overview]
Message-ID: <20210106005407.12295-5-paulmck@kernel.org> (raw)
In-Reply-To: <20210106005334.GA12159@paulmck-ThinkPad-P72>
From: "Paul E. McKenney" <paulmck@kernel.org>
Back in the day, RCU_INIT_POINTER() was the only way to avoid
memory-barrier instructions while storing NULL to an RCU-protected
pointer. Fortunately, in 2016, rcu_assign_pointer() started checking for
compile-time NULL pointers and omitting the memory-barrier instructions in
that case. Unfortunately, RCU's Requirements.rst document was not updated
accordingly. This commit therefore at long last carries out that update.
Fixes: 3a37f7275cda ("rcu: No ordering for rcu_assign_pointer() of NULL")
Link: https://lore.kernel.org/lkml/20201209230755.GV7338@casper.infradead.org/
Reported-by: Matthew Wilcox <willy@infradead.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
Documentation/RCU/Design/Requirements/Requirements.rst | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Documentation/RCU/Design/Requirements/Requirements.rst b/Documentation/RCU/Design/Requirements/Requirements.rst
index f32f8fa..65c7839 100644
--- a/Documentation/RCU/Design/Requirements/Requirements.rst
+++ b/Documentation/RCU/Design/Requirements/Requirements.rst
@@ -1668,8 +1668,7 @@ against mishaps and misuse:
this purpose.
#. It is not necessary to use rcu_assign_pointer() when creating
linked structures that are to be published via a single external
- pointer. The RCU_INIT_POINTER() macro is provided for this task
- and also for assigning ``NULL`` pointers at runtime.
+ pointer. The RCU_INIT_POINTER() macro is provided for this task.
This not a hard-and-fast list: RCU's diagnostic capabilities will
continue to be guided by the number and type of usage bugs found in
--
2.9.5
next prev parent reply other threads:[~2021-01-06 0:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 0:53 [PATCH tip/core/rcu 0/8] Documentation updates for v5.12 Paul E. McKenney
2021-01-06 0:54 ` [PATCH tip/core/rcu 1/8] docs: Remove redundant "``" from Requirements.rst paulmck
2021-01-06 0:54 ` [PATCH tip/core/rcu 2/8] doc: Remove obsolete RCU-bh and RCU-sched update-side API members paulmck
2021-01-06 0:54 ` [PATCH tip/core/rcu 3/8] list: Fix a typo at the kernel-doc markup paulmck
2021-01-06 0:54 ` [PATCH tip/core/rcu 4/8] docs: Fix typos and drop/fix dead links in RCU documentation paulmck
2021-01-06 0:54 ` paulmck [this message]
2021-01-06 0:54 ` [PATCH tip/core/rcu 6/8] doc: Remove obsolete rcutree.rcu_idle_lazy_gp_delay boot parameter paulmck
2021-01-06 0:54 ` [PATCH tip/core/rcu 7/8] doc: Update RCU's requirements page about the PREEMPT_RT wiki paulmck
2021-01-06 0:54 ` [PATCH tip/core/rcu 8/8] doc: Use CONFIG_PREEMPTION paulmck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210106005407.12295-5-paulmck@kernel.org \
--to=paulmck@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).