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: <x49k5fje77x.fsf@segfault.boston.devel.redhat.com>
Date:	Fri, 18 Jul 2008 07:56:34 -0400
From:	Jeff Moyer <jmoyer@...hat.com>
To:	Ian Kent <raven@...maw.net>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	autofs mailing list <autofs@...ux.kernel.org>,
	Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	Al Viro <viro@...IV.linux.org.uk>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 1/7] autofs4 - indirect dentry must almost always be positive

Ian Kent <raven@...maw.net> writes:

> Signed-off-by: Ian Kent <raven@...maw.net>

Reviewed-by: Jeff Moyer <jmoyer@...hat.com>

Cheers,

Jeff

>
> ---
>
>  fs/autofs4/waitq.c |   17 ++++++++++++++---
>  1 files changed, 14 insertions(+), 3 deletions(-)
>
>
> diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
> index bcb6c52..35216d1 100644
> --- a/fs/autofs4/waitq.c
> +++ b/fs/autofs4/waitq.c
> @@ -328,9 +328,20 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
>  	if (sbi->catatonic)
>  		return -ENOENT;
>  
> -	if (!dentry->d_inode &&
> -	    (sbi->type & (AUTOFS_TYPE_DIRECT | AUTOFS_TYPE_OFFSET)))
> -		return -ENOENT;
> +	if (!dentry->d_inode) {
> +		/*
> +		 * A wait for a negative dentry is invalid for certain
> +		 * cases. A direct or offset mount "always" has its mount
> +		 * point directory created and so the request dentry must
> +		 * be positive or the map key doesn't exist. The situation
> +		 * is very similar for indirect mounts except only dentrys
> +		 * in the root of the autofs file system may be negative.
> +		 */
> +		if (sbi->type & (AUTOFS_TYPE_DIRECT|AUTOFS_TYPE_OFFSET))
> +			return -ENOENT;
> +		else if (!IS_ROOT(dentry->d_parent))
> +			return -ENOENT;
> +	}
>  
>  	name = kmalloc(NAME_MAX + 1, GFP_KERNEL);
>  	if (!name)
> --
> 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/
--
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