From 21f72c9f0a6774d104fb655bda6099c378518945 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Wed, 28 Mar 2012 07:36:01 -0400 Subject: 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 Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields --- fs/nfsd/nfs4recover.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/nfsd') 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; } -- cgit v1.2.3-18-g5258