diff options
author | Tejun Heo <tj@kernel.org> | 2016-09-05 14:54:06 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-09-16 17:08:39 +0200 |
commit | fa07fb6a4ecad41d373eaf1574b9d54b4f0c1e75 (patch) | |
tree | 6443de8db4ce01d1cb351b59559190a72985abd5 /kernel | |
parent | Merge branch 'uaccess-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
download | linux-fa07fb6a4ecad41d373eaf1574b9d54b4f0c1e75.tar.xz linux-fa07fb6a4ecad41d373eaf1574b9d54b4f0c1e75.zip |
workqueue: dump workqueue state on sanity check failures in destroy_workqueue()
destroy_workqueue() performs a number of sanity checks to ensure that
the workqueue is empty before proceeding with destruction. However,
it's not always easy to tell what's going on just from the warning
message. Let's dump workqueue state after sanity check failures to
help debugging.
Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/CACT4Y+Zs6vkjHo9qHb4TrEiz3S4+quvvVQ9VWvj2Mx6pETGb9Q@mail.gmail.com
Cc: Dmitry Vyukov <dvyukov@google.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/workqueue.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index ef071ca73fc3..4eaec8b86d65 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -4021,6 +4021,7 @@ void destroy_workqueue(struct workqueue_struct *wq) for (i = 0; i < WORK_NR_COLORS; i++) { if (WARN_ON(pwq->nr_in_flight[i])) { mutex_unlock(&wq->mutex); + show_workqueue_state(); return; } } @@ -4029,6 +4030,7 @@ void destroy_workqueue(struct workqueue_struct *wq) WARN_ON(pwq->nr_active) || WARN_ON(!list_empty(&pwq->delayed_works))) { mutex_unlock(&wq->mutex); + show_workqueue_state(); return; } } |