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: <x49mywuci9i.fsf@segfault.boston.devel.redhat.com>
Date:	Tue, 14 Aug 2007 10:17:45 -0400
From:	Jeff Moyer <jmoyer@...hat.com>
To:	Ian Kent <raven@...maw.net>
Cc:	Andrew Morton <akpm@...l.org>,
	autofs mailing list <autofs@...ux.kernel.org>,
	Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [autofs] [PATCH] autofs4: deadlock during create

Ian Kent <raven@...maw.net> writes:

> Hi,
>
> Due to inconsistent locking in the VFS between calls to lookup and
> revalidate deadlock can occur in the automounter.
>
> The inconsistency is that the directory inode mutex is held for both
> lookup and revalidate calls when called via lookup_hash whereas it is
> held only for lookup during a path walk. Consequently, if the mutex
> is held during a call to revalidate autofs4 can't release the mutex
> to callback the daemon as it can't know whether it owns the mutex.
>
> This situation happens when a process tries to create a directory
> within an automount and a second process also tries to create the
> same directory between the lookup and the mkdir. Since the first
> process has dropped the mutex for the daemon callback, the second
> process takes it during revalidate leading to deadlock between the
> autofs daemon and the second process when the daemon tries to create
> the mount point directory.
>
> After spending quite a bit of time trying to resolve this on more than
> one occassion, using rather complex and ulgy approaches, it turns out
> that just delaying the hashing of the dentry until the create operation
> work fine.
>
> Signed-off-by: Ian Kent <raven@...maw.net>

Acked-by: Jeff Moyer <jmoyer@...hat.com>

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