Signed-off-by: Lai Jiangshan <[email protected]>
---
 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();
 
+       /* Cleanup call_rcu_data pointers before used */
+       maxcpus = 0;
+       free(per_cpu_call_rcu_data);
+       per_cpu_call_rcu_data = NULL;
+       thread_call_rcu_data = NULL;
+
        /* 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


_______________________________________________
ltt-dev mailing list
[email protected]
http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev

Reply via email to