lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200912142312.20163.oliver@neukum.org>
Date:	Mon, 14 Dec 2009 23:12:20 +0100
From:	Oliver Neukum <oliver@...kum.org>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Tejun Heo <tj@...nel.org>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: Warn people about flush_scheduled_work()

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ