Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport v3.5-branch] kernel: timer: Fix race condition in k_timer_start #64246

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

zephyrbot
Copy link
Collaborator

@zephyrbot zephyrbot commented Oct 23, 2023

Backport 4207f4a from #63491.

Fixes #62908

The documentation suggests that k_timer_start can be invoked from ISR
and preemptive contexts, however, an assertion failure occurs if one
k_timer_start call preempts another for the same timer instance. This
commit mitigates the issue by implementing a spinlock throughout the
k_timer_start function, ensuring thread-safety.

Fixes: #62908

Signed-off-by: Pedro Sousa <sousapedro596@gmail.com>
(cherry picked from commit 4207f4a)
@henrikbrixandersen
Copy link
Member

@andyross ping

@fabiobaltieri fabiobaltieri merged commit 3b52bc7 into v3.5-branch Nov 1, 2023
26 checks passed
@nashif nashif deleted the backport-63491-to-v3.5-branch branch February 13, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Kernel Backport Backport PR and backport failure issues
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

8 participants