linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] core: workqueue: BUG_ON on workqueue recursion
@ 2010-02-03 11:27 Simon Kagstrom
  2010-02-03 19:43 ` Oleg Nesterov
  2010-02-04  2:00 ` [PATCH] core: workqueue: BUG_ON " Lai Jiangshan
  0 siblings, 2 replies; 7+ messages in thread
From: Simon Kagstrom @ 2010-02-03 11:27 UTC (permalink / raw)
  To: linux-kernel, laijs; +Cc: oleg, rusty, tj, akpm, mingo

When the workqueue is flushed from workqueue context (recursively), the
system enters a strange state where things at random (dependent on the
global workqueue) start misbehaving. For example, for us the console and
logins locks up while the web server continues running.

Since the system becomes unstable, change this to a BUG_ON instead.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
---
 kernel/workqueue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index dee4865..e617d29 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -482,7 +482,7 @@ static int flush_cpu_workqueue(struct cpu_workqueue_struct *cwq)
 	int active = 0;
 	struct wq_barrier barr;
 
-	WARN_ON(cwq->thread == current);
+	BUG_ON(cwq->thread == current);
 
 	spin_lock_irq(&cwq->lock);
 	if (!list_empty(&cwq->worklist) || cwq->current_work != NULL) {
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-02-12  8:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-03 11:27 [PATCH] core: workqueue: BUG_ON on workqueue recursion Simon Kagstrom
2010-02-03 19:43 ` Oleg Nesterov
2010-02-04  2:12   ` Tejun Heo
2010-02-04  8:02     ` [PATCH v2] core: workqueue: return " Simon Kagstrom
2010-02-04 10:52       ` Oleg Nesterov
2010-02-12  8:47       ` Tejun Heo
2010-02-04  2:00 ` [PATCH] core: workqueue: BUG_ON " Lai Jiangshan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).