aboutsummaryrefslogtreecommitdiff
path: root/fs/nfsd/nfs4recover.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-03-28 07:36:01 -0400
committerJ. Bruce Fields <bfields@redhat.com>2012-03-28 10:10:24 -0400
commit21f72c9f0a6774d104fb655bda6099c378518945 (patch)
treefa320f8b928d9aa4277711f03d6d44af60e151b4 /fs/nfsd/nfs4recover.c
parent3af706135bcc06b1519ba50beaf1b47d32d0fc26 (diff)
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/nfsd/nfs4recover.c')
-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 21b53d57432..eaaf9482c7f 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;
}