From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: Johannes Berg <johannes.berg@intel.com>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>,
Hillf Danton <hdanton@sina.com>,
LKML <linux-kernel@vger.kernel.org>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH] workqueue: don't skip lockdep wq dependency in cancel_work_sync()
Date: Fri, 29 Jul 2022 11:28:40 +0900 [thread overview]
Message-ID: <afa1ac2c-a023-a91e-e596-60931b38247e@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <97cbf8a9-d5e1-376f-6a49-3474871ea6b4@I-love.SAKURA.ne.jp>
Thinking more, I might be confused by difference between
the lockdep "struct work_struct" dependency handling
and
the lockdep "struct work" dependency handling
. In an example that
work3_function() { /* nothing */ }
work4_function() { mutex_lock(&mutex); ... }
other_function() {
queue_work(ordered_wq, &work3);
queue_work(ordered_wq, &work4);
mutex_lock(&mutex);
cancel_work_sync(&work4);
}
, possibility of deadlock must be reported by lockdep via
the lockdep "struct work" dependency handling.
Then, prior to commit d6e89786bed977f3, lockdep flagging
the lockdep "struct work_struct" dependency handling
as if cancel_work_sync() was flush_work() is a problem, and
lockdep not flagging
the lockdep "struct work" dependency handling
from cancel_work_sync() as if flush_work() is also a problem.
Then, commit d6e89786bed977f3 might be OK, but commit 87915adc3f0acdf0
was wrong in that it preserved lockdep not flagging
the lockdep "struct work" dependency handling
from cancel_work_sync() as if flush_work().
next prev parent reply other threads:[~2022-07-29 2:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-28 12:23 Tetsuo Handa
2022-07-28 16:40 ` Tejun Heo
2022-07-28 23:18 ` Tetsuo Handa
2022-07-29 1:49 ` Tetsuo Handa
2022-07-29 2:28 ` Tetsuo Handa [this message]
2022-07-29 2:49 ` Tetsuo Handa
2022-07-29 2:54 ` [PATCH v2] workqueue: don't skip lockdep work " Tetsuo Handa
2022-07-29 4:30 ` [PATCH v3] " Tetsuo Handa
2022-08-15 21:16 ` Tejun Heo
2023-09-13 14:28 ` Guenter Roeck
2023-09-13 14:41 ` Johannes Berg
2023-09-13 15:59 ` Guenter Roeck
2023-09-13 17:25 ` Florian Fainelli
2023-09-13 17:45 ` Guenter Roeck
2023-09-13 18:30 ` Johannes Berg
2023-09-13 18:11 ` Johannes Berg
2022-07-29 2:38 ` [PATCH] workqueue: don't skip lockdep wq " Lai Jiangshan
2022-07-29 2:49 ` Lai Jiangshan
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=afa1ac2c-a023-a91e-e596-60931b38247e@I-love.SAKURA.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--cc=hdanton@sina.com \
--cc=jiangshanlai@gmail.com \
--cc=johannes.berg@intel.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®