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: <Pine.LNX.4.44L0.0908121635221.23954-100000@iolanthe.rowland.org>
Date:	Wed, 12 Aug 2009 16:41:01 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	James Bottomley <James.Bottomley@...senPartnership.com>
cc:	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Add kerneldoc for flush_scheduled_work()

On Wed, 12 Aug 2009, James Bottomley wrote:

> > I'll accept that.  However it means that the SCSI midlayer violates
> > your own locking rules with regard to the scan mutex.  Whereas if
> > flush_scheduled_work() were avoided, the locking rules would not be
> > violated.
> 
> Why do you think I've been trying to get rid of it?  Global mutexes
> covering large swathes of code are always a bad idea.  The async code
> already picked up a deadlock entanglement with it.

And yet it does serve an important purpose.

An alternative to that mutex would be to make all scanning and removal 
activities on a host funnel through a single thread.  Do you think that 
would be preferable?  (I'm not trying to be sarcastic -- this is a 
serious question.)


> > The rules for submission are _not_ the same.  With 
> > flush_scheduled_work():
> > 
> > 	Make sure that any lock you hold while flushing is private
> > 	and is not used (even indirectly) by any of your publicly 
> > 	exported routines.
> > 
> > With cancel_work_sync():
> > 
> > 	Make sure that any lock you hold while cancelling is not
> > 	used (even indirectly) by the work routine being cancelled.
> 
> The hair splitting has got to the point where I don't really care.  The
> point is that flush_scheduled_work() and cancel_work_sync() have similar
> problems.  Amazingly that was my original point.

And my original point was that the problems, though similar in nature, 
are harder to deal with in one case than in the other.

Alan Stern

--
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