From 865515e2fe4651978f355613c5972dcdcfd92ddd Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sat, 26 Feb 2022 17:44:06 +0100 Subject: lib: Fix lock reversal in timerwheel There was a lock reversal in the timerwheel. There still is a thorough revision needed of the locking in dev.c after the FRCP logic is completed and tuned. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/frct.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src') diff --git a/src/lib/frct.c b/src/lib/frct.c index 2793f3c4..42ce2152 100644 --- a/src/lib/frct.c +++ b/src/lib/frct.c @@ -233,8 +233,6 @@ static void __send_frct_pkt(int fd, f = &ai.flows[fd]; - pthread_rwlock_rdlock(&ai.lock); - if (f->qs.cypher_s > 0 && crypt_encrypt(f, sdb) < 0) goto fail; @@ -247,12 +245,9 @@ static void __send_frct_pkt(int fd, shm_flow_set_notify(f->set, f->flow_id, FLOW_PKT); - pthread_rwlock_unlock(&ai.lock); - return; fail: - pthread_rwlock_unlock(&ai.lock); ipcp_sdb_release(sdb); return; } -- cgit v1.2.3