Skip to content

Commit

Permalink
Merge branch 'contrib/github_pr_11402' into 'master'
Browse files Browse the repository at this point in the history
esp_ds: ignore releasing mutex if not called from same task (GitHub PR)

Closes IDFGH-10131

See merge request espressif/esp-idf!23763
  • Loading branch information
mahavirj committed May 19, 2023
2 parents 4f9f50c + 704dfc9 commit 1747f2e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/mbedtls/port/esp_ds/esp_rsa_sign_alt.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ esp_err_t esp_ds_init_data_ctx(esp_ds_data_ctx_t *ds_data)

void esp_ds_release_ds_lock(void)
{
/* Give back the semaphore (DS lock) */
xSemaphoreGive(s_ds_lock);
if (xSemaphoreGetMutexHolder(s_ds_lock) == xTaskGetCurrentTaskHandle()) {
/* Give back the semaphore (DS lock) */
xSemaphoreGive(s_ds_lock);
}
}

size_t esp_ds_get_keylen(void *ctx)
Expand Down

0 comments on commit 1747f2e

Please sign in to comment.