提交 6f2370d2 编写于 作者: S Stefan Wahren 提交者: Greg Kroah-Hartman

staging: vchiq_core: Don't BUG if process is unexpected

Bail out properly if the process index doesn't match the remote insert.
We also drop the BUG in case the process index is at local insert,
so we can trigger the WARN_ON again some steps later.
Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5d1a94bb
......@@ -1963,9 +1963,14 @@ parse_rx_slots(VCHIQ_STATE_T *state)
mutex_unlock(&service->bulk_mutex);
break;
}
BUG_ON(queue->process == queue->local_insert);
BUG_ON(queue->process != queue->remote_insert);
if (queue->process != queue->remote_insert) {
pr_err("%s: p %x != ri %x\n",
__func__,
queue->process,
queue->remote_insert);
mutex_unlock(&service->bulk_mutex);
goto bail_not_ready;
}
bulk = &queue->bulks[
BULK_INDEX(queue->remote_insert)];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册