From 995fcc2f16c5775c801613f42f2cba1fe30297ed Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 13 Apr 2012 22:06:58 +0300 Subject: [PATCH] --- yaml --- r: 304774 b: refs/heads/master c: f5b2552b4ebbeadcadde1532d7bbd3f850719046 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/workqueue.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0a4cee8886e6..5f4f8300f563 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d3283fb45c06dfd7b1a36da8e6ff39d313f0600c +refs/heads/master: f5b2552b4ebbeadcadde1532d7bbd3f850719046 diff --git a/trunk/kernel/workqueue.c b/trunk/kernel/workqueue.c index 5abf42f63c08..66ec08de6dac 100644 --- a/trunk/kernel/workqueue.c +++ b/trunk/kernel/workqueue.c @@ -1032,7 +1032,10 @@ static void __queue_work(unsigned int cpu, struct workqueue_struct *wq, cwq = get_cwq(gcwq->cpu, wq); trace_workqueue_queue_work(cpu, cwq, work); - BUG_ON(!list_empty(&work->entry)); + if (WARN_ON(!list_empty(&work->entry))) { + spin_unlock_irqrestore(&gcwq->lock, flags); + return; + } cwq->nr_in_flight[cwq->work_color]++; work_flags = work_color_to_flags(cwq->work_color);