From 67582acc14664032e7dcaf8ab311d7601fcff59b Mon Sep 17 00:00:00 2001 From: chao an Date: Thu, 16 Jan 2025 10:07:56 +0800 Subject: [PATCH] sched/wqueue: fix potential deadlock sched_unlock() should called after spin_unlock Signed-off-by: chao an --- 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 6160bbd0b8a..813b46c0a55 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 */