From: laijs@cn.fujitsu.com (Lai Jiangshan)
Subject: [ltt-dev] [PATCH 7/7] urcu, call_rcu: Array initialized before pointer is planted
Date: Wed, 28 Sep 2011 16:34:33 +0800 [thread overview]
Message-ID: <78bc30a7c083ea5fb41ac3b53d305490d9361752.1317198301.git.laijs@cn.fujitsu.com> (raw)
In-Reply-To: <cover.1317198301.git.laijs@cn.fujitsu.com>
Signed-off-by: Lai Jiangshan <laijs at cn.fujitsu.com>
---
urcu-call-rcu-impl.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/urcu-call-rcu-impl.h b/urcu-call-rcu-impl.h
index 3c68ae7..462139a 100644
--- a/urcu-call-rcu-impl.h
+++ b/urcu-call-rcu-impl.h
@@ -104,6 +104,10 @@ static void alloc_cpu_call_rcu_data(void)
p = malloc(maxcpus * sizeof(*per_cpu_call_rcu_data));
if (p != NULL) {
memset(p, '\0', maxcpus * sizeof(*per_cpu_call_rcu_data));
+
+ /* Array initialized before pointer is planted. */
+ cmm_smp_mb();
+
per_cpu_call_rcu_data = p;
} else {
if (!warned) {
--
1.7.4.4
next prev parent reply other threads:[~2011-09-28 8:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 8:34 [ltt-dev] [PATCH 0/7] urcu,call_rcu: minior fixes, round2 Lai Jiangshan
2011-09-28 8:34 ` [ltt-dev] [PATCH 1/7] urcu, call_rcu: protects call_rcu_data_list when remove node Lai Jiangshan
2011-09-29 17:00 ` Mathieu Desnoyers
2011-09-28 8:34 ` [ltt-dev] [PATCH 2/7] urcu, defer_rcu: fix missing respond to a cancellation request Lai Jiangshan
2011-09-29 17:13 ` Mathieu Desnoyers
2011-09-28 8:34 ` [ltt-dev] [PATCH 3/7] urcu, defer_rcu: Avoid thread exit unexpected Lai Jiangshan
2011-09-29 17:27 ` Mathieu Desnoyers
2011-09-28 8:34 ` [ltt-dev] [PATCH 4/7] urcu, defer_rcu: Simplify defer_rcu() encoding Lai Jiangshan
2011-09-29 17:49 ` Mathieu Desnoyers
2011-09-28 8:34 ` [ltt-dev] [PATCH 5/7] urcu, call_rcu: avoid create call_rcu_data for child when unneed Lai Jiangshan
2011-09-29 17:27 ` Paul E. McKenney
2011-09-29 17:52 ` Mathieu Desnoyers
2011-09-28 8:34 ` [ltt-dev] [PATCH 6/7] urcu, call_rcu: Cleanup call_rcu_data pointers before used in child Lai Jiangshan
2011-09-29 17:37 ` Paul E. McKenney
2011-09-29 17:59 ` Mathieu Desnoyers
2011-09-29 18:08 ` Paul E. McKenney
2011-09-29 18:19 ` Mathieu Desnoyers
2011-09-29 18:29 ` Paul E. McKenney
2011-09-29 18:28 ` Mathieu Desnoyers
2011-09-29 19:43 ` Mathieu Desnoyers
2011-09-29 19:53 ` Mathieu Desnoyers
2011-09-28 8:34 ` Lai Jiangshan [this message]
2011-09-29 17:33 ` [ltt-dev] [PATCH 7/7] urcu, call_rcu: Array initialized before pointer is planted Paul E. McKenney
2011-09-29 20:07 ` Mathieu Desnoyers
2011-09-29 21:13 ` Mathieu Desnoyers
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=78bc30a7c083ea5fb41ac3b53d305490d9361752.1317198301.git.laijs@cn.fujitsu.com \
--to=laijs@cn.fujitsu.com \
/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