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: <20110604004231.GV11521@ZenIV.linux.org.uk>
Date:	Sat, 4 Jun 2011 01:42:31 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Dave Chinner <david@...morbit.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, xfs@....sgi.com
Subject: Re: [PATCH 08/12] superblock: introduce per-sb cache shrinker
 infrastructure

> @@ -278,7 +325,12 @@ void generic_shutdown_super(struct super_block *sb)
>  {
>  	const struct super_operations *sop = sb->s_op;
>  
> -
> +	/*
> +	 * shut down the shrinker first so we know that there are no possible
> +	 * races when shrinking the dcache or icache. Removes the need for
> +	 * external locking to prevent such races.
> +	 */
> +	unregister_shrinker(&sb->s_shrink);
>  	if (sb->s_root) {
>  		shrink_dcache_for_umount(sb);
>  		sync_filesystem(sb);

What it means is that shrinker_rwsem now nests inside ->s_umount...  IOW,
if any ->shrink() gets stuck, so does every generic_shutdown_super().
I'm still not convinced it's a good idea - especially since _this_
superblock will be skipped anyway.  Is there any good reason to evict
shrinker that early?  Note that doing that after ->s_umount is dropped
should be reasonably safe - your shrinker will see that superblock is
doomed if it's called anywhere in that window...
--
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