chr_read() is printing an error message and returning with s->data_mutex taken.
This can potentially cause a hang. Reported by Coverity.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <
20230427125423.103536-1-pbonzini@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit
3ee7f21ed292966f5cd3eb71aa06f8ffc0e5ae41)
(Mjt: pick this trivial focused change up for 7.2.x so that subsequent fixes in this area applies cleanly)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
if (size != msg.size) {
qos_printf("%s: Wrong message size received %d != %d\n",
__func__, size, msg.size);
- return;
+ goto out;
}
}
break;
}
+out:
g_mutex_unlock(&s->data_mutex);
}