* [PATCH] NFS: Don't trace an uninitialised value
@ 2021-11-05 16:38 trondmy
2021-11-05 16:54 ` Nathan Chancellor
0 siblings, 1 reply; 2+ messages in thread
From: trondmy @ 2021-11-05 16:38 UTC (permalink / raw)
To: Nathan Chancellor; +Cc: linux-nfs
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFS: Don't trace an uninitialised value
2021-11-05 16:38 [PATCH] NFS: Don't trace an uninitialised value trondmy
@ 2021-11-05 16:54 ` Nathan Chancellor
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Chancellor @ 2021-11-05 16:54 UTC (permalink / raw)
To: trondmy; +Cc: linux-nfs
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-05 16:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-05 16:38 [PATCH] NFS: Don't trace an uninitialised value trondmy
2021-11-05 16:54 ` Nathan Chancellor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox