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: <CA+55aFxJKQMjGm00kBpj30twj1w60Mx4C0mXTJtHiJPOpu-iMA@mail.gmail.com>
Date:	Tue, 18 Sep 2012 08:56:46 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Miklos Szeredi <miklos@...redi.hu>
Cc:	Al Viro <viro@...iv.linux.org.uk>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org, hch@...radead.org,
	Trond.Myklebust@...app.com
Subject: Re: [PATCH 1/2] vfs: dcache: fix deadlock in tree traversal

On Tue, Sep 18, 2012 at 7:53 AM, Miklos Szeredi <miklos@...redi.hu> wrote:
>
> Yes, with the test cases that IBM were using it is DCACHE_DISCONNECTED
> case that triggers the double-lock.  Trond was misusing
> DCACHE_DISCONNECTED and this made the failure in try_to_ascend() much
> more likely (and bogus).  But there is a case, which is triggered rarely
> if ever, when try_to_ascend() failure with rename_lock held is perfectly
> valid.

Ok. The whole DCACHE_DISCONNECTED logic there is clearly bogus and
results in endless loops if that case then ever triggers, but you fix
that in the second patch.

HOWEVER. Why introduce that new DCACHE_KILLED flag at all? Wouldn't it
be much better to just check whether the dentry is hashed instead of
introducing a new flag for this case? Couldn't we just check for
"d_unhashed()"?

Anyway, I don't hate the 2/2 thing, but these are clearly related, and
I'd like to understand why we had that odd DCACHE_DISCONNECTED test in
the first place when there *seems* to be more straightforward
approaches to it?

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