I made a mistake, please ignore this.

________________________________
发件人: Wang,Li(ACG Cloud)
发送时间: 2019年6月25日 20:08:21
收件人: [email protected]
抄送: Wang,Li(ACG Cloud)
主题: [PATCH] ovs-rcu: Fix potential double free issue

If pthread_setspecific set value of the key to NULL, then it will trigger the
destructor function ovsrcu_thread_exit_cb to call ovsrcu_unregister__ 
implicitly,
so we have to remove it here to avoid potential double free issue.

Signed-off-by: Wang Li <[email protected]>
---
 lib/ovs-rcu.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c
index ebc8120..3adfe5c 100644
--- a/lib/ovs-rcu.c
+++ b/lib/ovs-rcu.c
@@ -134,7 +134,6 @@ ovsrcu_quiesce_start(void)
     perthread = pthread_getspecific(perthread_key);
     if (perthread) {
         pthread_setspecific(perthread_key, NULL);
-        ovsrcu_unregister__(perthread);
     }

     ovsrcu_quiesced();
--
1.7.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to