This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new b8660fc39c sim: fix regression from https://github.com/apache/nuttx/pull/14623 b8660fc39c is described below commit b8660fc39cb663c1334345c4c0c0daca4cdff109 Author: hujun5 <huj...@xiaomi.com> AuthorDate: Fri Jan 17 08:54:58 2025 +0800 sim: fix regression from https://github.com/apache/nuttx/pull/14623 reason: work_timer_expiry may be called in thread context Signed-off-by: hujun5 <huj...@xiaomi.com> --- sched/wqueue/kwork_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sched/wqueue/kwork_queue.c b/sched/wqueue/kwork_queue.c index 157094f075..401ccba264 100644 --- a/sched/wqueue/kwork_queue.c +++ b/sched/wqueue/kwork_queue.c @@ -68,9 +68,8 @@ static void work_timer_expiry(wdparm_t arg) { FAR struct work_s *work = (FAR struct work_s *)arg; - DEBUGASSERT(up_interrupt_context()); - irqstate_t flags = spin_lock_irqsave(&work->wq->lock); + sched_lock(); /* We have being canceled */ @@ -80,6 +79,7 @@ static void work_timer_expiry(wdparm_t arg) } spin_unlock_irqrestore(&work->wq->lock, flags); + sched_unlock(); } static bool work_is_canceling(FAR struct kworker_s *kworkers, int nthreads,