svm: fix producer deadlock in svm_msg_q_wait() 59/31759/5
authornandfan <fanyufei521@outlook.com>
Thu, 25 Mar 2021 06:24:53 +0000 (14:24 +0800)
committerFlorin Coras <florin.coras@gmail.com>
Thu, 25 Mar 2021 19:54:18 +0000 (19:54 +0000)
commitabd8b36d19408403a40d24aa411686d52011a844
treec41e12b946a922a65957da1b9e265abc9d5b14a7
parent418bf6aaef6048d15bc1f575a166e8f5e52696be
svm: fix producer deadlock in svm_msg_q_wait()

1. When producer invokes svm_msg_q_wait() in svm_msg_q_lock_and_alloc_msg_w_ring(), queue mutex is held by itself.
2. Sometimes, svm msg queue is not full and ring is full, svm_msg_q_wait() do nothing with mutex held, consumer will blocking at svm_msg_q_send_signal().

Type: fix

Signed-off-by: nandfan <fanyufei521@outlook.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib90b87ab76534cd42e9a4c3e11703e80d93ca678
src/svm/message_queue.c