From: Oliver Neukum <oliver@neukum.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Tejun Heo <tj@kernel.org>,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: Warn people about flush_scheduled_work()
Date: Mon, 14 Dec 2009 23:12:20 +0100 [thread overview]
Message-ID: <200912142312.20163.oliver@neukum.org> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0912141701040.2690-100000@iolanthe.rowland.org>
Am Montag, 14. Dezember 2009 23:02:51 schrieb Alan Stern:
> On Mon, 14 Dec 2009, Oliver Neukum wrote:
>
> > Am Montag, 14. Dezember 2009 22:33:38 schrieb Alan Stern:
> > > Consider using cancel_work_sync() or cancel_delayed_work_sync()
> > > instead. In most situations they will accomplish what you
> > > need.
> >
> > In which respect is cancel_work_sync() fundamentally safer?
> > If the work is already running and takes a lock you are holding,
> > then what?
>
> With cancel_work_sync() you know what locks the work item is going to
> take, since it's your work item. With flush_scheduled_work() you have
> no idea what locks will be needed by the items on the queue. They
> could come from anywhere.
True, but what use is that if you don't know your call chain and the locks
it takes.
Regards
Oliver
next prev parent reply other threads:[~2009-12-14 22:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-14 21:33 Alan Stern
2009-12-14 21:42 ` Oliver Neukum
2009-12-14 22:02 ` Alan Stern
2009-12-14 22:12 ` Oliver Neukum [this message]
2009-12-14 23:04 ` Alan Stern
2009-12-14 22:38 ` Tejun Heo
2009-12-14 23:14 ` Alan Stern
2009-12-14 23:25 ` Tejun Heo
2009-12-16 15:52 ` [PATCH] Warn " Alan Stern
2009-12-21 8:26 ` Tejun Heo
2010-02-12 8:47 ` 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=200912142312.20163.oliver@neukum.org \
--to=oliver@neukum.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--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
Powered by JetHome