From d6ed8941133e37bb16fd89c04b9db758c912a505 Mon Sep 17 00:00:00 2001 From: Erhan Kurubas Date: Mon, 23 Aug 2021 17:17:19 +0300 Subject: [PATCH] esp_ipc: fix race condition in ipc task --- components/app_trace/CMakeLists.txt | 1 - components/bt/controller/lib_esp32 | 2 +- components/bt/controller/lib_esp32c3_family | 2 +- components/cbor/tinycbor | 2 +- components/coap/libcoap | 2 +- components/esp_ipc/ipc.c | 2 +- components/esp_wifi/lib | 2 +- components/tinyusb/tinyusb | 2 +- 8 files changed, 7 insertions(+), 8 deletions(-) diff --git a/components/app_trace/CMakeLists.txt b/components/app_trace/CMakeLists.txt index 20b8277c08..aafb87e259 100644 --- a/components/app_trace/CMakeLists.txt +++ b/components/app_trace/CMakeLists.txt @@ -30,7 +30,6 @@ endif() idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "${include_dirs}" - PRIV_INCLUDE_DIRS "${priv_include_dirs}" PRIV_REQUIRES soc esp_ipc LDFRAGMENTS linker.lf) diff --git a/components/bt/controller/lib_esp32 b/components/bt/controller/lib_esp32 index cfbb0571fb..fb49791b7c 160000 --- a/components/bt/controller/lib_esp32 +++ b/components/bt/controller/lib_esp32 @@ -1 +1 @@ -Subproject commit cfbb0571fb424ca4a68a0c172cbff1fdc79fd91b +Subproject commit fb49791b7c1a8a35f06e68124c90022667b4cff1 diff --git a/components/bt/controller/lib_esp32c3_family b/components/bt/controller/lib_esp32c3_family index 9ca8afd50a..7ad49c38b8 160000 --- a/components/bt/controller/lib_esp32c3_family +++ b/components/bt/controller/lib_esp32c3_family @@ -1 +1 @@ -Subproject commit 9ca8afd50afde57958a67fca65847edc52f7d91c +Subproject commit 7ad49c38b893952bbed155ede2c7684f0307f6d3 diff --git a/components/cbor/tinycbor b/components/cbor/tinycbor index 7c349dbb6b..085ca40781 160000 --- a/components/cbor/tinycbor +++ b/components/cbor/tinycbor @@ -1 +1 @@ -Subproject commit 7c349dbb6b8d76db39383b226d3ebdf59b8ab37d +Subproject commit 085ca40781f7c39febe6d14fb7e5cba342e1804b diff --git a/components/coap/libcoap b/components/coap/libcoap index 9b6451c365..98954eb30a 160000 --- a/components/coap/libcoap +++ b/components/coap/libcoap @@ -1 +1 @@ -Subproject commit 9b6451c3654bc1f625e36c87f018c2da34bea5e6 +Subproject commit 98954eb30a2e728e172a6cd29430ae5bc999b585 diff --git a/components/esp_ipc/ipc.c b/components/esp_ipc/ipc.c index cc6f904691..98331077e5 100644 --- a/components/esp_ipc/ipc.c +++ b/components/esp_ipc/ipc.c @@ -75,7 +75,6 @@ static void IRAM_ATTR ipc_task(void* arg) if (s_ipc_wait[cpuid] == IPC_WAIT_FOR_END) { xSemaphoreGive(s_ipc_ack[cpuid]); } - s_func[cpuid] = NULL; } } @@ -142,6 +141,7 @@ static esp_err_t esp_ipc_call_and_wait(uint32_t cpu_id, esp_ipc_func_t func, voi s_ipc_wait[cpu_id] = wait_for; xSemaphoreGive(s_ipc_sem[cpu_id]); xSemaphoreTake(s_ipc_ack[cpu_id], portMAX_DELAY); + s_func[cpu_id] = NULL; #ifdef CONFIG_ESP_IPC_USES_CALLERS_PRIORITY xSemaphoreGive(s_ipc_mutex[cpu_id]); #else diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 045b526641..e6945e61f7 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 045b526641b7dbe7a6be3d9039be93a2c1b56f10 +Subproject commit e6945e61f7c63545a77b0575c3770a85b4de948e diff --git a/components/tinyusb/tinyusb b/components/tinyusb/tinyusb index c4badd394e..334e95fac5 160000 --- a/components/tinyusb/tinyusb +++ b/components/tinyusb/tinyusb @@ -1 +1 @@ -Subproject commit c4badd394eda18199c0196ed0be1e2d635f0a5f6 +Subproject commit 334e95fac52a607150157ae5199a19e11f843982