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:	Sun, 23 Oct 2011 19:14:34 +0800
From:	Ian Kent <raven@...maw.net>
To:	Gerlando Falauto <gerlando.falauto@...mile.com>
Cc:	linux-kernel@...r.kernel.org, David Howells <dhowells@...hat.com>,
	Jeffrey Layton <jlayton@...hat.com>
Subject: Re: [PATCH] CIFS: fix automount for DFS shares

On Fri, 2011-10-07 at 13:09 +0200, Gerlando Falauto wrote:
> Automounting directories are now invalidated by .d_revalidate()
> so to be d_instantiate()d again with the right DCACHE_NEED_AUTOMOUNT
> flag

But why doesn't CIFS know this is a DFS inode the first time around, it
appears to do a truck load of work looking that stuff up?

> 
> Signed-off-by: Gerlando Falauto <gerlando.falauto@...mile.com>
> ---
>  fs/cifs/dir.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
> index 9ea65cf..67f54d3 100644
> --- a/fs/cifs/dir.c
> +++ b/fs/cifs/dir.c
> @@ -637,8 +637,13 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
>  	if (direntry->d_inode) {
>  		if (cifs_revalidate_dentry(direntry))
>  			return 0;
> -		else
> +		else {
> +			/* We want automonting inodes to be
> +			 * considered invalid or so */
> +			if (IS_AUTOMOUNT(direntry->d_inode))
> +				return 0;

I'd be inclined to set DCACHE_NEED_AUTOMOUNT here but are we certain
that cifs_revalidate_dentry() will always return 0 for a DFS inode or at
least ones that don't yet have DCACHE_NEED_AUTOMOUNT set and why?

>  			return 1;
> +		}
>  	}
>  
>  	/*


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