mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix(ble): fixed cache error risk in ble log module
This commit is contained in:
@@ -107,7 +107,8 @@ void ble_log_lbm_write_trans(ble_log_prph_trans_t **trans, ble_log_src_t src_cod
|
||||
}
|
||||
if (len_append) {
|
||||
#if CONFIG_SOC_ESP_NIMBLE_CONTROLLER
|
||||
if (omdata) {
|
||||
if (omdata && !BLE_LOG_IN_ISR()) {
|
||||
/* os_mbuf_copydata is in flash and not safe to call from ISR */
|
||||
os_mbuf_copydata((struct os_mbuf *)addr_append, 0,
|
||||
len_append, buf + BLE_LOG_FRAME_HEAD_LEN + len);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,8 @@ portMUX_TYPE ble_log_spin_lock = portMUX_INITIALIZER_UNLOCKED;
|
||||
#if CONFIG_BLE_LOG_XOR_CHECKSUM_ENABLED
|
||||
#include "esp_compiler.h"
|
||||
|
||||
static inline uint32_t ror32(uint32_t word, uint32_t shift)
|
||||
BLE_LOG_IRAM_ATTR BLE_LOG_STATIC BLE_LOG_INLINE
|
||||
uint32_t ror32(uint32_t word, uint32_t shift)
|
||||
{
|
||||
if (unlikely(shift == 0)) {
|
||||
return word;
|
||||
|
||||
Reference in New Issue
Block a user