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 67582acc14 sched/wqueue: fix potential deadlock
67582acc14 is described below
commit 67582acc14664032e7dcaf8ab311d7601fcff59b
Author: chao an <[email protected]>
AuthorDate: Thu Jan 16 10:07:56 2025 +0800
sched/wqueue: fix potential deadlock
sched_unlock() should called after spin_unlock
Signed-off-by: chao an <[email protected]>
---
sched/wqueue/kwork_notifier.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sched/wqueue/kwork_notifier.c b/sched/wqueue/kwork_notifier.c
index 6160bbd0b8..813b46c0a5 100644
--- a/sched/wqueue/kwork_notifier.c
+++ b/sched/wqueue/kwork_notifier.c
@@ -404,8 +404,8 @@ void work_notifier_signal(enum work_evtype_e evtype,
}
}
- sched_unlock();
spin_unlock_irqrestore(&g_notifier_lock, flags);
+ sched_unlock();
}
#endif /* CONFIG_WQUEUE_NOTIFIER */