From 90c6eb1da7d403a0f83c6e636b6a1077a4ef8d32 Mon Sep 17 00:00:00 2001 From: Ying Zhang Date: Fri, 28 Feb 2025 08:47:48 +0100 Subject: [PATCH] random: Correct Mutex define Correct Mutex ctr_lock defination as the wrong defination lead to sysworkq task not acquiring this mutex during bt init, which lead to BLE didn't work as described in issue https://github.com/zephyrproject-rtos/zephyr/issues/86444 Signed-off-by: Ying Zhang --- subsys/random/random_ctr_drbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/random/random_ctr_drbg.c b/subsys/random/random_ctr_drbg.c index 697c29da58b8..25f563e30404 100644 --- a/subsys/random/random_ctr_drbg.c +++ b/subsys/random/random_ctr_drbg.c @@ -24,7 +24,7 @@ static const struct device *entropy_dev; static const unsigned char drbg_seed[] = CONFIG_CS_CTR_DRBG_PERSONALIZATION; static bool ctr_initialised; -static struct k_mutex ctr_lock; +static K_MUTEX_DEFINE(ctr_lock); static mbedtls_ctr_drbg_context ctr_ctx;