提交 32b083a3 编写于 作者: A Andy King 提交者: Greg Kroah-Hartman

VMCI: Fix deref before NULL-check of queuepair ptr

Check for a valid queuepair ptr before trying to lock the queuepair (which will
deref it).
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NAndy King <acking@vmware.com>
Signed-off-by: NDmitry Torokhov <dtor@vmware.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 42281d20
......@@ -3355,11 +3355,11 @@ ssize_t vmci_qpair_dequev(struct vmci_qp *qpair,
{
ssize_t result;
qp_lock(qpair);
if (!qpair || !iov)
return VMCI_ERROR_INVALID_ARGS;
qp_lock(qpair);
do {
result = qp_dequeue_locked(qpair->produce_q,
qpair->consume_q,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册