From mboxrd@z Thu Jan 1 00:00:00 1970 From: laijs@cn.fujitsu.com (Lai Jiangshan) Date: Fri, 16 Sep 2011 11:33:11 +0800 Subject: [ltt-dev] [PATCH 00/10] urcu,call_rcu: minior fixes, round1 In-Reply-To: <20110915155700.GB2428@linux.vnet.ibm.com> References: <20110915152304.GK3813@Krystal> <20110915155700.GB2428@linux.vnet.ibm.com> Message-ID: <4E72C377.2080004@cn.fujitsu.com> On 09/15/2011 11:57 PM, Paul E. McKenney wrote: > On Thu, Sep 15, 2011 at 11:23:04AM -0400, Mathieu Desnoyers wrote: >> * Lai Jiangshan (laijs at cn.fujitsu.com) wrote: >>> 2cleanups and 8bugfixes >>> >>> Lai Jiangshan (10): >>> add missing static >>> init maxcpus before use it >>> use get_cpu_call_rcu_data() for get_call_rcu_data() >>> use cds_list_for_each_entry_safe() >>> avoid memory leak in call_rcu_data_free() >>> wake up default call_rcu thread after we move the leftover callbacks >>> protect writing to per_cpu_call_rcu_data[*] >>> Return -EEXIST when the old cpu call_rcu_data has not been removed >>> avoid leaking crdp for failed path >>> protects call_rcu_data_list when remove node > > These look good to me, thank you, Lai! > >> Hi Lai, >> >> I think patch 10 (protects call_rcu_data_list when remove node) did not >> make it into my inbox. Can you resend it please ? > > Same here. > > Thanx, Paul > sorry, patch is appended. Thanks, Lai Subject: [PATCH 10/10] protects call_rcu_data_list when remove node Signed-off-by: Lai Jiangshan --- urcu-call-rcu-impl.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/urcu-call-rcu-impl.h b/urcu-call-rcu-impl.h index f9250e8..87d9157 100644 --- a/urcu-call-rcu-impl.h +++ b/urcu-call-rcu-impl.h @@ -617,7 +617,10 @@ void call_rcu_data_free(struct call_rcu_data *crdp) wake_call_rcu_thread(default_call_rcu_data); } + call_rcu_lock(&call_rcu_mutex); cds_list_del(&crdp->list); + call_rcu_unlock(&call_rcu_mutex); + free(crdp); } -- 1.7.4.4