Merge remote-tracking branch 'origin/fix-segfault-multi-ue' into integration_2024_w46 (!3108)
Prevent segfaults in gNB stack Three fixes for segfaults, discovered while running with many UEs. See commit messages for more details.
This commit is contained in:
@@ -613,7 +613,7 @@ static void pf_dl(module_id_t module_id,
|
||||
gNB_MAC_INST *mac = RC.nrmac[module_id];
|
||||
NR_ServingCellConfigCommon_t *scc=mac->common_channels[0].ServingCellConfigCommon;
|
||||
// UEs that could be scheduled
|
||||
UEsched_t UE_sched[MAX_MOBILES_PER_GNB] = {0};
|
||||
UEsched_t UE_sched[MAX_MOBILES_PER_GNB + 1] = {0};
|
||||
int remainUEs = max_num_ue;
|
||||
int curUE = 0;
|
||||
int CC_id = 0;
|
||||
|
||||
@@ -2962,8 +2962,9 @@ void nr_csirs_scheduling(int Mod_idP, frame_t frame, sub_frame_t slot, int n_slo
|
||||
|
||||
static void nr_mac_clean_cellgroup(NR_CellGroupConfig_t *cell_group)
|
||||
{
|
||||
DevAssert(cell_group != NULL);
|
||||
/* remove a reconfigurationWithSync, we don't need it anymore */
|
||||
if (cell_group->spCellConfig->reconfigurationWithSync != NULL) {
|
||||
if (cell_group->spCellConfig && cell_group->spCellConfig->reconfigurationWithSync != NULL) {
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_ReconfigurationWithSync, cell_group->spCellConfig->reconfigurationWithSync);
|
||||
cell_group->spCellConfig->reconfigurationWithSync = NULL;
|
||||
}
|
||||
|
||||
@@ -1790,7 +1790,7 @@ static void pf_ul(module_id_t module_id,
|
||||
|
||||
const int min_rb = nrmac->min_grant_prb;
|
||||
// UEs that could be scheduled
|
||||
UEsched_t UE_sched[MAX_MOBILES_PER_GNB] = {0};
|
||||
UEsched_t UE_sched[MAX_MOBILES_PER_GNB + 1] = {0};
|
||||
int remainUEs = max_num_ue;
|
||||
int curUE = 0;
|
||||
|
||||
|
||||
@@ -915,7 +915,7 @@ static void rrc_gNB_process_RRCReestablishmentComplete(gNB_RRC_INST *rrc, gNB_RR
|
||||
* reestablishment, instead of re-requesting the CellGroupConfig from the DU.
|
||||
* Hence, add below hack; the solution would be to request the
|
||||
* CellGroupConfig from the DU when doing reestablishment. */
|
||||
if (cellGroupConfig->spCellConfig->reconfigurationWithSync != NULL) {
|
||||
if (cellGroupConfig->spCellConfig && cellGroupConfig->spCellConfig->reconfigurationWithSync) {
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_ReconfigurationWithSync, cellGroupConfig->spCellConfig->reconfigurationWithSync);
|
||||
cellGroupConfig->spCellConfig->reconfigurationWithSync = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user