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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080215131922.0d0dcb08.akpm@linux-foundation.org>
Date:	Fri, 15 Feb 2008 13:19:22 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Harvey Harrison <harvey.harrison@...il.com>
Cc:	rathamahata@...4.ru, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] befs: fix sparse warning in linuxvfs.c

On Fri, 15 Feb 2008 10:46:04 -0800
Harvey Harrison <harvey.harrison@...il.com> wrote:

> Use link as the variable name to avoid shadowing the arg.
> 
> fs/befs/linuxvfs.c:492:8: warning: symbol 'p' shadows an earlier one
> fs/befs/linuxvfs.c:488:77: originally declared here
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@...il.com>
> ---
> This should be checked in case there is a latent bug here.  Should it
> be the arg *p getting freed, or the local var *p that was shadowing
> it?
> 

The code looks OK - the name was allocated in befs_follow_link() and was
saved away with nd_set_link().

> 
> diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
> index 82123ff..e8717de 100644
> --- a/fs/befs/linuxvfs.c
> +++ b/fs/befs/linuxvfs.c
> @@ -489,9 +489,9 @@ static void befs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
>  {
>  	befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
>  	if (befs_ino->i_flags & BEFS_LONG_SYMLINK) {
> -		char *p = nd_get_link(nd);
> -		if (!IS_ERR(p))
> -			kfree(p);
> +		char *link = nd_get_link(nd);
> +		if (!IS_ERR(link))
> +			kfree(link);
>  	}
>  }
>  
> -- 
> 1.5.4.1.1278.gc75be
> 
> 
--
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