From: Tejun Heo <tj@kernel.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: workqueue: Is flush_work() without INIT_WORK() OK?
Date: Fri, 18 Jan 2019 06:05:26 -0800 [thread overview]
Message-ID: <20190118140526.GB50184@devbig004.ftw2.facebook.com> (raw)
In-Reply-To: <7d751e65-e695-e23b-9cec-ef3f44289a56@i-love.sakura.ne.jp>
Hello, Tetsuo.
On Fri, Jan 18, 2019 at 08:58:49PM +0900, Tetsuo Handa wrote:
> struct work_struct work;
> memset(&work, 0, sizeof(work));
> flush_work(&work);
>
> . Is this behavior defined as "safe and no-op"? If this should be "safe and no-op",
Nope, that's a bug.
> we need to check whether INIT_WORK() was called before starting lockdep checks
> at __flush_work(). If this is not "safe and no-op", I want to emit a warning if
> INIT_WORK() was not called.
Sounds like a good idea.
Thanks.
--
tejun
prev parent reply other threads:[~2019-01-18 14:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-18 11:58 Tetsuo Handa
2019-01-18 14:05 ` Tejun Heo [this message]
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=20190118140526.GB50184@devbig004.ftw2.facebook.com \
--to=tj@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
/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®