From mboxrd@z Thu Jan 1 00:00:00 1970 From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers) Date: Thu, 29 Sep 2011 14:28:12 -0400 Subject: [ltt-dev] [PATCH 6/7] urcu, call_rcu: Cleanup call_rcu_data pointers before used in child In-Reply-To: <0f645da2f35f5c974a7059655e7b2e199cf98f72.1317198301.git.laijs@cn.fujitsu.com> References: <0f645da2f35f5c974a7059655e7b2e199cf98f72.1317198301.git.laijs@cn.fujitsu.com> Message-ID: <20110929182812.GB8064@Krystal> * Lai Jiangshan (laijs at cn.fujitsu.com) wrote: > Signed-off-by: Lai Jiangshan > --- > urcu-call-rcu-impl.h | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/urcu-call-rcu-impl.h b/urcu-call-rcu-impl.h > index 65c1c7a..3c68ae7 100644 > --- a/urcu-call-rcu-impl.h > +++ b/urcu-call-rcu-impl.h > @@ -686,6 +686,12 @@ void call_rcu_after_fork_child(void) > default_call_rcu_data = NULL; > (void)get_default_call_rcu_data(); We should probably free the old default_call_rcu_data before ? and remove it from the call_rcu_data_list ? What about the cds queues content ? > > + /* Cleanup call_rcu_data pointers before used */ > + maxcpus = 0; > + free(per_cpu_call_rcu_data); Shouldn't we clean the cds queues and remove it from call_rcu_data_list too ? > + per_cpu_call_rcu_data = NULL; > + thread_call_rcu_data = NULL; Same question applies to thread_call_rcu_data. Thanks, Mathieu > + > /* Dispose of all of the rest of the call_rcu_data structures. */ > cds_list_for_each_entry_safe(crdp, next, &call_rcu_data_list, list) { > if (crdp == default_call_rcu_data) > -- > 1.7.4.4 > -- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com