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: <878t80f3h0.fsf@xmission.com>
Date:   Thu, 31 May 2018 06:51:07 -0500
From:   ebiederm@...ssion.com (Eric W. Biederman)
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Ian Kent <raven@...maw.net>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Mark Brown <broonie@...nel.org>,
        Ingo Molnar <mingo@...nel.org>, NeilBrown <neilb@...e.com>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] autofs: small cleanup in autofs_getpath()

Dan Carpenter <dan.carpenter@...cle.com> writes:

> We don't set "*name" so it's slightly nicer to just pass "name" instead
> of "&name".
>
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

Acked-by: "Eric W. Biederman" <ebiederm@...ssion.com>

This seems like an obvious and reasonable cleanup.

> diff --git a/fs/autofs/waitq.c b/fs/autofs/waitq.c
> index 8c858126c751..f6385c6ef0a5 100644
> --- a/fs/autofs/waitq.c
> +++ b/fs/autofs/waitq.c
> @@ -179,7 +179,7 @@ static void autofs_notify_daemon(struct autofs_sb_info *sbi,
>  }
>  
>  static int autofs_getpath(struct autofs_sb_info *sbi,
> -			  struct dentry *dentry, char **name)
> +			  struct dentry *dentry, char *name)
>  {
>  	struct dentry *root = sbi->sb->s_root;
>  	struct dentry *tmp;
> @@ -189,7 +189,7 @@ static int autofs_getpath(struct autofs_sb_info *sbi,
>  	unsigned seq;
>  
>  rename_retry:
> -	buf = *name;
> +	buf = name;
>  	len = 0;
>  
>  	seq = read_seqbegin(&rename_lock);
> @@ -395,7 +395,7 @@ int autofs_wait(struct autofs_sb_info *sbi,
>  	if (IS_ROOT(dentry) && autofs_type_trigger(sbi->type))
>  		qstr.len = sprintf(name, "%p", dentry);
>  	else {
> -		qstr.len = autofs_getpath(sbi, dentry, &name);
> +		qstr.len = autofs_getpath(sbi, dentry, name);
>  		if (!qstr.len) {
>  			kfree(name);
>  			return -ENOENT;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ