From dc8c5687c693faa1168da10631d3823a4c73e697 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 12 Feb 2020 09:47:17 +0100 Subject: [PATCH] fix rwlock in PDCP we've used a rdlock but since the users struct is modified, we should be really using a rwlock --- srsenb/src/stack/upper/pdcp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srsenb/src/stack/upper/pdcp.cc b/srsenb/src/stack/upper/pdcp.cc index c23af7320..86e9327a5 100644 --- a/srsenb/src/stack/upper/pdcp.cc +++ b/srsenb/src/stack/upper/pdcp.cc @@ -53,7 +53,7 @@ void pdcp::stop() void pdcp::add_user(uint16_t rnti) { - pthread_rwlock_rdlock(&rwlock); + pthread_rwlock_wrlock(&rwlock); if (users.count(rnti) == 0) { srslte::pdcp* obj = new srslte::pdcp(timers, log_h); obj->init(&users[rnti].rlc_itf, &users[rnti].rrc_itf, &users[rnti].gtpu_itf);