From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Tejun Heo <tj@kernel.org>, linux-kernel@vger.kernel.org
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Subject: [PATCH 7/7] workqueue: avoid false negative WARN_ON()
Date: Thu, 4 Apr 2013 10:05:38 +0800 [thread overview]
Message-ID: <1365041143-3088-7-git-send-email-laijs@cn.fujitsu.com> (raw)
In-Reply-To: <1365041143-3088-1-git-send-email-laijs@cn.fujitsu.com>
it is very common wq->dfl_pwq->refcnt > 1.
[ 7.939873] WARNING: at kernel/workqueue.c:4201 destroy_workqueue+0x6a/0x13e()
[ 7.943601] Hardware name: 4286C12
[ 7.947250] Modules linked in: sdhci_pci sdhci mmc_core usb_storage i915 drm_kms_helper drm i2c_algo_bit i2c_core video
[ 7.951313] Pid: 361, comm: umount Not tainted 3.9.0-rc5+ #29
[ 7.955309] Call Trace:
[ 7.959346] [<c04314a7>] warn_slowpath_common+0x7c/0x93
[ 7.963506] [<c044796a>] ? destroy_workqueue+0x6a/0x13e
[ 7.967748] [<c044796a>] ? destroy_workqueue+0x6a/0x13e
[ 7.971981] [<c04314e0>] warn_slowpath_null+0x22/0x24
[ 7.976383] [<c044796a>] destroy_workqueue+0x6a/0x13e
[ 7.980875] [<c056dc01>] ext4_put_super+0x43/0x2c4
[ 7.985407] [<c050bd48>] ? dispose_list+0x28/0x32
[ 7.989987] [<c050c652>] ? evict_inodes+0xcf/0xd7
[ 7.994509] [<c04fb7b8>] generic_shutdown_super+0x4b/0xb9
[ 7.999130] [<c04fb848>] kill_block_super+0x22/0x60
[ 8.003594] [<c04fb960>] deactivate_locked_super+0x2f/0x56
[ 8.008077] [<c04fc41b>] deactivate_super+0x2e/0x31
[ 8.012523] [<c050f1e6>] mntput_no_expire+0x103/0x108
[ 8.017050] [<c050fdce>] sys_umount+0x2a2/0x2c4
[ 8.021429] [<c050fe0e>] sys_oldumount+0x1e/0x20
[ 8.025678] [<c085ba4d>] sysenter_do_call+0x12/0x38
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
kernel/workqueue.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 3f33077..f015c38 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -4198,7 +4198,7 @@ void destroy_workqueue(struct workqueue_struct *wq)
}
}
- if (WARN_ON(pwq->refcnt > 1) ||
+ if (WARN_ON((pwq != wq->dfl_pwq) && (pwq->refcnt > 1)) ||
WARN_ON(pwq->nr_active) ||
WARN_ON(!list_empty(&pwq->delayed_works))) {
mutex_unlock(&wq->mutex);
--
1.7.7.6
next prev parent reply other threads:[~2013-04-04 2:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 2:05 [PATCH 1/7] workqueue: add __WQ_FREEZING and remove POOL_FREEZING Lai Jiangshan
2013-04-04 2:05 ` [PATCH 2/7] workqueue: set __WQ_FREEZING only when freezable Lai Jiangshan
2013-04-04 2:05 ` [PATCH 3/7] workqueue: rename rebind_workers() to associate_cpu_pool() Lai Jiangshan
2013-04-04 14:15 ` Tejun Heo
2013-04-04 2:05 ` [PATCH 4/7] workqueue: simplify workqueue_cpu_up_callback(CPU_ONLINE) Lai Jiangshan
2013-04-04 2:05 ` [PATCH 5/7] workqueue, use default pwq when fail to allocate node pwd Lai Jiangshan
2013-04-04 14:34 ` Tejun Heo
2013-04-04 2:05 ` [PATCH 6/7] workqueue: node-awared allocation for unbound pool Lai Jiangshan
2013-04-04 14:38 ` Tejun Heo
2013-04-04 2:05 ` Lai Jiangshan [this message]
2013-04-04 14:55 ` [PATCH] workqueue: avoid false negative WARN_ON() in destroy_workqueue() Tejun Heo
2013-04-05 7:39 ` Lai Jiangshan
2013-04-04 14:12 ` [PATCH 1/7] workqueue: add __WQ_FREEZING and remove POOL_FREEZING Tejun Heo
2013-04-20 16:12 ` Lai Jiangshan
2013-04-21 1:29 ` Tejun Heo
2014-03-25 9:56 ` [PATCH] " Lai Jiangshan
2014-03-27 12:08 ` Lai Jiangshan
2014-03-27 14:48 ` Tejun Heo
2014-04-16 19:51 ` Tejun Heo
2014-04-16 23:58 ` Lai Jiangshan
2014-04-17 15:29 ` Tejun Heo
2014-04-16 20:50 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1365041143-3088-7-git-send-email-laijs@cn.fujitsu.com \
--to=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®