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]
Date:	Mon, 9 Jan 2012 11:18:13 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Al Viro <viro@...iv.linux.org.uk>,
	Miklos Szeredi <miklos@...redi.hu>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	mgorman@...e.de, gregkh@...e.de, akpm@...ux-foundation.org,
	david@...morbit.com
Subject: Re: [RFC PATCH] shrink_dcache_parent() deadlock

On Mon, Jan 9, 2012 at 11:04 AM, Christoph Hellwig <hch@...radead.org> wrote:
>
> After Dave's patch select_parent isolates dentries that are going to
> be dropped directly to an on-stack list instead of abusing the LRU.
>
> With that scheme the trylock and retry loop in __shrink_dcache_sb
> goes away completely for this caller.

Yes, but it still exists for the prune_dcache_sb() case.

So prune_dcache_sb() puts random dentries on its own private lists,
and drops the lru_lock (and the dentry lock).

In the meantime, what protects us from select_parent() finding those
*same* dentries, and doing

    dentry_lru_move_list(dentry, dispose);

which - despite the name - moves the dentry not from the lru list, but
from the prune_dcache_sb local list to the select_parent() local
list..

Hmm. I guess the endless "move back-and-forth" thing is gone, but the
random "move from one private list to another" makes me worry about
the confusion.

But I guess we don't care - the same thing is going to happen to the
dentry regardless of which of the local lists it is on.

And in any case, I think Dave's patch looks like a nice cleanup. Does
it work for people in that forward-ported-alone version I sent out?

And Miklos, does it fix your test-case? Because if so, I think Dave's
patch is nicer, and avoids adding a new state bit by just cleaning
things up in general.

                        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