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:	Tue, 06 Aug 2013 13:06:17 -0700
From:	Anand Avati <avati@...hat.com>
To:	Miklos Szeredi <miklos@...redi.hu>
CC:	rwheeler@...hat.com, viro@...IV.linux.org.uk, bfoster@...hat.com,
	dhowells@...hat.com, eparis@...hat.com,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-nfs@...r.kernel.org, Trond.Myklebust@...app.com,
	swhiteho@...hat.com, mszeredi@...e.cz
Subject: Re: [PATCH 4/4] fuse: drop dentry on failed revalidate

On 8/6/13 7:30 AM, Miklos Szeredi wrote:
> From: Anand Avati <avati@...hat.com>
>
> Drop a subtree when we find that it has moved or been delated.  This can be
> done as long as there are no submounts under this location.
>
> If the directory was moved and we come across the same directory in a
> future lookup it will be reconnected by d_materialise_unique().
>
> Signed-off-by: Anand Avati <avati@...hat.com>
> Signed-off-by: Miklos Szeredi <mszeredi@...e.cz>
> ---
>   fs/fuse/dir.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
> index 131d14b..4ba5893 100644
> --- a/fs/fuse/dir.c
> +++ b/fs/fuse/dir.c
> @@ -226,8 +226,13 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
>   		if (!err) {
>   			struct fuse_inode *fi = get_fuse_inode(inode);
>   			if (outarg.nodeid != get_node_id(inode)) {
> +				int ret = 0;
> +
> +				if (check_submounts_and_drop(entry) != 0)
> +					ret = 1;
> +
>   				fuse_queue_forget(fc, forget, outarg.nodeid, 1);
> -				return 0;
> +				return ret;

If outarg.nodeid != get_node_id(inode), then we have to return 0 no 
matter what (whether we successfully dropped the entry or not), no? Or 
are you trying to forcefully keep the path to reach the submount alive? 
If so, we still fail in inode_permission() .. -> getattr() of the dir 
inode, no?

Avati

>   			}
>   			spin_lock(&fc->lock);
>   			fi->nlookup++;
>

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