linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [WTFoTW] ->quota_on() deadlocks
@ 2010-07-01 18:56 Al Viro
  2010-07-01 22:38 ` Christoph Hellwig
  2010-07-02 20:13 ` Jan Kara
  0 siblings, 2 replies; 4+ messages in thread
From: Al Viro @ 2010-07-01 18:56 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Jan Kara, Joel Becker, Christoph Hellwig

	All quotactl callbacks are done with s_umount held shared.
Fine, but ->quota_on() will do kern_path() and _that_ can try to
grab the same thing exclusive - suppose we pass a pathname that
walks into autofs and triggers mounting of the same fs (at a different
mountpoint, that is).  That'll end up calling sget(), finding our
superblock and trying to grab s_umount on it.  mount(8) sits
uninterruptibly sleeping in mount(2), kern_path() waits for it
to complete and that's not going to happen until the caller of
kern_path() (do_quotactl(), ultimately) finishes.

	Obvious solution is b0rken - we _can't_ take the call of
kern_path() to a point prior to getting (and locking) the superblock.
Why?  Because ocfs2 ignores the pathname argument, so failing on
bogus pathnames will blow the userland API compatibility.

	Other alternatives are also not particulary pleasant since
we need s_umount at some point there - we want some exclusion with
remounting.

	Ideas?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-07-02 20:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-01 18:56 [WTFoTW] ->quota_on() deadlocks Al Viro
2010-07-01 22:38 ` Christoph Hellwig
2010-07-02 10:25   ` Christoph Hellwig
2010-07-02 20:13 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).