workqueue: Warn attempt to flush system-wide workqueues.

Based on commit c4f135d643 ("workqueue: Wrap flush_workqueue() using
a macro"), all in-tree users stopped flushing system-wide workqueues.
Therefore, start emitting runtime message so that all out-of-tree users
will understand that they need to update their code.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Tetsuo Handa
2023-06-30 21:28:53 +09:00
committed by Tejun Heo
parent 3f01e9fed8
commit 20bdedafd2
2 changed files with 8 additions and 47 deletions
+5 -6
View File
@@ -6571,10 +6571,9 @@ void __init workqueue_init(void)
wq_watchdog_init();
}
/*
* Despite the naming, this is a no-op function which is here only for avoiding
* link error. Since compile-time warning may fail to catch, we will need to
* emit run-time warning from __flush_workqueue().
*/
void __warn_flushing_systemwide_wq(void) { }
void __warn_flushing_systemwide_wq(void)
{
pr_warn("WARNING: Flushing system-wide workqueues will be prohibited in near future.\n");
dump_stack();
}
EXPORT_SYMBOL(__warn_flushing_systemwide_wq);