From a8b974f245937e4c6f6beea8d8e87a1a60de6c5a Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 18 Dec 2019 10:11:24 +0100 Subject: [PATCH] intr_alloc: don't call ESP_LOG from a critical section Calling ESP_LOG from a critical section leads to abort() in 4.1, and may also randomly abort() in earlier versions. Closes FCS-268 --- components/esp32/intr_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp32/intr_alloc.c b/components/esp32/intr_alloc.c index d4726499f..f72eae961 100644 --- a/components/esp32/intr_alloc.c +++ b/components/esp32/intr_alloc.c @@ -743,11 +743,11 @@ esp_err_t esp_intr_free(intr_handle_t handle) } //If nothing left, disable interrupt. if (handle->vector_desc->shared_vec_info==NULL) free_shared_vector=true; - ESP_LOGV(TAG, "esp_intr_free: Deleting shared int: %s. Shared int is %s", svd?"not found or last one":"deleted", free_shared_vector?"empty now.":"still in use"); + ESP_EARLY_LOGV(TAG, "esp_intr_free: Deleting shared int: %s. Shared int is %s", svd?"not found or last one":"deleted", free_shared_vector?"empty now.":"still in use"); } if ((handle->vector_desc->flags&VECDESC_FL_NONSHARED) || free_shared_vector) { - ESP_LOGV(TAG, "esp_intr_free: Disabling int, killing handler"); + ESP_EARLY_LOGV(TAG, "esp_intr_free: Disabling int, killing handler"); #if CONFIG_SYSVIEW_ENABLE if (!free_shared_vector) { void *isr_arg = xt_get_interrupt_handler_arg(handle->vector_desc->intno);