From 9c4f9caa08850bd8646903758b70e9096da7968f Mon Sep 17 00:00:00 2001 From: naoi Date: Thu, 28 Dec 2017 19:36:46 +0900 Subject: [PATCH 1/3] fix queue full --- common/utils/itti/intertask_interface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/utils/itti/intertask_interface.c b/common/utils/itti/intertask_interface.c index 66b5e9aedc..387d37d61d 100644 --- a/common/utils/itti/intertask_interface.c +++ b/common/utils/itti/intertask_interface.c @@ -470,6 +470,7 @@ int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, Me itti_get_task_name(destination_task_id)); int result = itti_free(origin_task_id, message); AssertFatal( result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); + return 0; #else AssertFatal(0, "Error: lfds611_queue_enqueue returns 0, queue is full, exiting\n"); #endif From 1c1a01adfdce30dcdafeaf84ea90cc20360de563 Mon Sep 17 00:00:00 2001 From: Xu Bo Date: Mon, 8 Jan 2018 17:07:40 +0900 Subject: [PATCH 2/3] fix double free bug --- common/utils/hashtable/hashtable.c | 3 ++- openair2/LAYER2/MAC/eNB_scheduler.c | 2 +- openair2/LAYER2/MAC/pre_processor.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/utils/hashtable/hashtable.c b/common/utils/hashtable/hashtable.c index 6322b1dea6..2c7b35744c 100644 --- a/common/utils/hashtable/hashtable.c +++ b/common/utils/hashtable/hashtable.c @@ -95,7 +95,7 @@ hash_table_t *hashtable_create(const hash_size_t sizeP, hash_size_t (*hashfuncP) * Cleanup * The hashtable_destroy() walks through the linked lists for each possible hash value, and releases the elements. It also releases the nodes array and the hash_table_t. */ -hashtable_rc_t hashtable_destroy(hash_table_t * const hashtblP) +hashtable_rc_t hashtable_destroy(hash_table_t * hashtblP) { hash_size_t n; hash_node_t *node, *oldnode; @@ -117,6 +117,7 @@ hashtable_rc_t hashtable_destroy(hash_table_t * const hashtblP) } free(hashtblP->nodes); free(hashtblP); + hashtblP=NULL; return HASH_TABLE_OK; } //------------------------------------------------------------------------------------------------------------------------------- diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index 80032d6b99..7ae6862af3 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -163,7 +163,7 @@ schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) (nfapi_ul_config_srs_pdu)); ul_config_pdu->srs_pdu.srs_pdu_rel8.size = (uint8_t) - sizeof(nfapi_ul_config_srs_pdu);; + sizeof(nfapi_ul_config_srs_pdu); ul_config_pdu->srs_pdu.srs_pdu_rel8.rnti = UE_list->UE_template[CC_id][UE_id]. rnti; diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 6277c1c69f..a711695228 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -637,6 +637,7 @@ void dlsch_scheduler_pre_ue_select( default: LOG_W(MAC,"Unsupported transmission mode %d\n", get_tmode(module_idP,CC_id,UE_id)); aggregation = 2; + break; } format_flag = 1; if (!CCE_allocation_infeasible(module_idP, From d69390c273070fb62d161ec15a4405838989c9b1 Mon Sep 17 00:00:00 2001 From: Xu Bo Date: Mon, 8 Jan 2018 19:07:35 +0900 Subject: [PATCH 3/3] delete unused comment --- openair2/LAYER2/MAC/pre_processor.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index a711695228..c0413c3411 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -2365,11 +2365,14 @@ void ulsch_scheduler_pre_ue_select( } // UE round >0 for ( UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++ ) { + if (UE_list->active[UE_id] == FALSE) + continue; + rnti = UE_RNTI(module_idP,UE_id); - CC_id = UE_PCCID(module_idP,UE_id); if (rnti ==NOT_A_RNTI) continue; + CC_id = UE_PCCID(module_idP,UE_id); if (UE_list->UE_template[CC_id][UE_id].configured == FALSE) continue; @@ -2473,11 +2476,18 @@ void ulsch_scheduler_pre_ue_select( } for ( UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++ ) { + if (UE_list->active[UE_id] == FALSE) + continue; + rnti = UE_RNTI(module_idP,UE_id); - CC_id = UE_PCCID(module_idP,UE_id); if (rnti ==NOT_A_RNTI) continue; + CC_id = UE_PCCID(module_idP,UE_id); + + if (UE_id > last_ulsch_ue_id[CC_id]) + continue; + if (UE_list->UE_template[CC_id][UE_id].configured == FALSE) continue; @@ -2496,9 +2506,6 @@ void ulsch_scheduler_pre_ue_select( } } - if (UE_id > last_ulsch_ue_id[CC_id]) - continue; - for(i = 0;i