提交 21f72c9f 编写于 作者: J Jeff Layton 提交者: J. Bruce Fields

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJeff Layton <jlayton@redhat.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 3af70613
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册