diff --git a/sched/wqueue/kwork_notifier.c b/sched/wqueue/kwork_notifier.c index 96fdbea39d..697c34eb2b 100644 --- a/sched/wqueue/kwork_notifier.c +++ b/sched/wqueue/kwork_notifier.c @@ -344,6 +344,7 @@ void work_notifier_signal(enum work_evtype_e evtype, */ flags = enter_critical_section(); + sched_lock(); /* Process the notification at the head of the pending list until the * pending list is empty @@ -386,6 +387,7 @@ void work_notifier_signal(enum work_evtype_e evtype, } } + sched_unlock(); leave_critical_section(flags); }