summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-03-28 13:36:01 +0200
committerJ. Bruce Fields <bfields@redhat.com>2012-03-28 16:10:24 +0200
commit21f72c9f0a6774d104fb655bda6099c378518945 (patch)
treefa320f8b928d9aa4277711f03d6d44af60e151b4 /fs
parentnfsd4: memory corruption in numeric_name_to_id() (diff)
downloadlinux-21f72c9f0a6774d104fb655bda6099c378518945.tar.xz
linux-21f72c9f0a6774d104fb655bda6099c378518945.zip
nfsd: fix NULL pointer dereference in cld_pipe_downcall
If we find that "cup" is NULL in this case, then we obviously don't want to dereference it. What we really want to print in this case is the xid that we copied off earlier. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4recover.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index 21b53d57432c..eaaf9482c7f5 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -602,8 +602,7 @@ cld_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
/* couldn't find upcall? */
if (!cup) {
- dprintk("%s: couldn't find upcall -- xid=%u\n", __func__,
- cup->cu_msg.cm_xid);
+ dprintk("%s: couldn't find upcall -- xid=%u\n", __func__, xid);
return -EINVAL;
}