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] [day] [month] [year] [list]
Message-ID: <20120110215240.GA24410@dastard>
Date:	Wed, 11 Jan 2012 08:52:40 +1100
From:	Dave Chinner <david@...morbit.com>
To:	Miklos Szeredi <miklos@...redi.hu>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	Christoph Hellwig <hch@...radead.org>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	mgorman@...e.de, gregkh@...e.de, akpm@...ux-foundation.org
Subject: Re: [RFC PATCH] shrink_dcache_parent() deadlock

On Tue, Jan 10, 2012 at 05:22:22PM +0100, Miklos Szeredi wrote:
> On Tue, Jan 10, 2012 at 5:00 PM, Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
> > On Tue, Jan 10, 2012 at 2:05 AM, Miklos Szeredi <miklos@...redi.hu> wrote:
> >>
> >> I tested Dave's patch and the bug can still be easily reproduced.
> >>
> >> And that's to be expected, as the intermediate "being on the lru"
> >> state that Dave's patch eliminates doesn't play a fundamental part in
> >> the mechanism of the livelock.  It does eliminate one trylock, but
> >> that's not the one critical to this bug (removing it is a very good
> >> idea anyway).
> >>
> >> The critical trylock here is the one in dentry_kill() which tries to
> >> lock the parent.
> >
> > Ok. Here's your patch munged for current -git. You've got most of a
> > changelog, can you send this out with the right subject and a
> > sign-off, and re-test with the current git just to make sure.
> 
> See the one with the subject "vfs: fix shrink_dcache_parent()
> livelock" I sent out a bit earlier.
> 
> You didn't quite get it right: the flag now needs to be set in
> select_parent() not prune_dcache_sb().
> 
> I think prune_dcache_sb() doesn't need this logic (although it
> wouldn't hurt either) because that one is called from the slab
> shrinkers and those are protected from being run multiple times in
> parallel, I hope.

Shrinkers can be called in parallel by memory reclaim on different
CPUs. The only thing serialising them is the LRU locks.

Cheers,

Dave.
-- 
Dave Chinner
david@...morbit.com
--
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