From f9686e5fce1c44aedbfb9bde2675a62cca2ba723 Mon Sep 17 00:00:00 2001 From: yagoda Date: Wed, 5 Apr 2023 14:51:53 +0200 Subject: [PATCH] eMBMS: moving RRC add_user call for MRNTI to avoiding potential deadlock --- srsenb/src/stack/mac/mac.cc | 1 - srsenb/src/stack/rrc/rrc.cc | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/srsenb/src/stack/mac/mac.cc b/srsenb/src/stack/mac/mac.cc index 9b22381f7..c11aa7bc2 100644 --- a/srsenb/src/stack/mac/mac.cc +++ b/srsenb/src/stack/mac/mac.cc @@ -1056,7 +1056,6 @@ void mac::write_mcch(const srsran::sib2_mbms_t* sib2_, if (!ret) { logger.info("Failed to allocate rnti=0x%x.for eMBMS", SRSRAN_MRNTI); } - rrc_h->add_user(SRSRAN_MRNTI, {}); } // Internal helper function, caller must hold UE DB rwlock diff --git a/srsenb/src/stack/rrc/rrc.cc b/srsenb/src/stack/rrc/rrc.cc index fa20eab80..93fb90161 100644 --- a/srsenb/src/stack/rrc/rrc.cc +++ b/srsenb/src/stack/rrc/rrc.cc @@ -951,6 +951,7 @@ void rrc::configure_mbsfn_sibs() task_sched.defer_task([this, sibs2, sibs13, mcch_t]() mutable { phy->configure_mbsfn(&sibs2, &sibs13, mcch_t); mac->write_mcch(&sibs2, &sibs13, &mcch_t, mcch_payload_buffer, current_mcch_length); + add_user(SRSRAN_MRNTI, {}); }); }