public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: trondmy@kernel.org
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NFS: Don't trace an uninitialised value
Date: Fri, 5 Nov 2021 09:54:21 -0700	[thread overview]
Message-ID: <YYVhvS5q3GyuaBAL@archlinux-ax161> (raw)
In-Reply-To: <20211105163852.214665-1-trondmy@kernel.org>

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

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

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

      reply	other threads:[~2021-11-05 16:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 16:38 [PATCH] NFS: Don't trace an uninitialised value trondmy
2021-11-05 16:54 ` Nathan Chancellor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YYVhvS5q3GyuaBAL@archlinux-ax161 \
    --to=nathan@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox