Check for a valid queuepair ptr before trying to lock the queuepair (which will
deref it).
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andy King <acking@vmware.com>
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (!qpair || !iov)
return VMCI_ERROR_INVALID_ARGS;
if (!qpair || !iov)
return VMCI_ERROR_INVALID_ARGS;
do {
result = qp_dequeue_locked(qpair->produce_q,
qpair->consume_q,
do {
result = qp_dequeue_locked(qpair->produce_q,
qpair->consume_q,