--- zzzz-none-000/linux-4.9.276/kernel/sched/wait.c 2021-07-20 14:21:16.000000000 +0000 +++ falcon-5530-750/linux-4.9.276/kernel/sched/wait.c 2023-04-05 08:19:02.000000000 +0000 @@ -10,6 +10,7 @@ #include #include #include +#include void __init_waitqueue_head(wait_queue_head_t *q, const char *name, struct lock_class_key *key) { @@ -91,6 +92,7 @@ { unsigned long flags; + BUG_ON_YIELDTHREAD_NOT_ALLOWED(); spin_lock_irqsave(&q->lock, flags); __wake_up_common(q, mode, nr_exclusive, 0, key); spin_unlock_irqrestore(&q->lock, flags); @@ -102,12 +104,14 @@ */ void __wake_up_locked(wait_queue_head_t *q, unsigned int mode, int nr) { + BUG_ON_YIELDTHREAD_NOT_ALLOWED(); __wake_up_common(q, mode, nr, 0, NULL); } EXPORT_SYMBOL_GPL(__wake_up_locked); void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, void *key) { + BUG_ON_YIELDTHREAD_NOT_ALLOWED(); __wake_up_common(q, mode, 1, 0, key); } EXPORT_SYMBOL_GPL(__wake_up_locked_key); @@ -135,6 +139,7 @@ unsigned long flags; int wake_flags = 1; /* XXX WF_SYNC */ + BUG_ON_YIELDTHREAD_NOT_ALLOWED(); if (unlikely(!q)) return; @@ -152,6 +157,7 @@ */ void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr_exclusive) { + BUG_ON_YIELDTHREAD_NOT_ALLOWED(); __wake_up_sync_key(q, mode, nr_exclusive, NULL); } EXPORT_SYMBOL_GPL(__wake_up_sync); /* For internal use only */