diff options
Diffstat (limited to 'kernel/workqueue.c')
| -rw-r--r-- | kernel/workqueue.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 2e94fd93abe6..6ca72d53d9ca 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -218,6 +218,14 @@ void fastcall flush_workqueue(struct workqueue_struct *wq) continue; cwq = wq->cpu_wq + cpu; + if (cwq->thread == current) { + /* + * Probably keventd trying to flush its own queue. + * So simply run it by hand rather than deadlocking. + */ + run_workqueue(cwq); + continue; + } spin_lock_irq(&cwq->lock); sequence_needed = cwq->insert_sequence; |
