Re: [PATCH] NFS: Don't trace an uninitialised value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 05, 2021 at 12:38:52PM -0400, trondmy@xxxxxxxxxx wrote:
> From: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
> 
> If fhandle is NULL or fattr is NULL, then 'error' is uninitialised.
> 
> Reported-by: Nathan Chancellor <nathan@xxxxxxxxxx>
> Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>

Reviewed-by: Nathan Chancellor <nathan@xxxxxxxxxx>

> ---
>  fs/nfs/dir.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
> index 8de99f426183..731d31015b6a 100644
> --- a/fs/nfs/dir.c
> +++ b/fs/nfs/dir.c
> @@ -1798,7 +1798,7 @@ struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned in
>  	}
>  	nfs_set_verifier(dentry, dir_verifier);
>  out:
> -	trace_nfs_lookup_exit(dir, dentry, flags, error);
> +	trace_nfs_lookup_exit(dir, dentry, flags, PTR_ERR_OR_ZERO(res));
>  	nfs_free_fattr(fattr);
>  	nfs_free_fhandle(fhandle);
>  	return res;
> -- 
> 2.33.1
> 



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux