On Tue, Jun 19, 2018 at 11:01:00AM +0200, Marc-André Lureau wrote:
> Hi
>
> On Tue, Jun 19, 2018 at 8:23 AM, Gerd Hoffmann wrote:
> >> @@ -237,7 +251,7 @@ static int vhost_user_read(struct vhost_dev *dev,
> >> VhostUserMsg *msg)
> >> error_report("Failed to read msg header."
> >>
Hi
On Tue, Jun 19, 2018 at 8:23 AM, Gerd Hoffmann wrote:
>> @@ -237,7 +251,7 @@ static int vhost_user_read(struct vhost_dev *dev,
>> VhostUserMsg *msg)
>> error_report("Failed to read msg header."
>> " Size %d exceeds the maximum %zu.", msg->hdr.size,
>>
> @@ -237,7 +251,7 @@ static int vhost_user_read(struct vhost_dev *dev,
> VhostUserMsg *msg)
> error_report("Failed to read msg header."
> " Size %d exceeds the maximum %zu.", msg->hdr.size,
> VHOST_USER_PAYLOAD_SIZE);
> -goto fail;
> +ret
Split vhost_user_read(), so only header can be read with
vhost_user_read_header().
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-user.c | 27 +++
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 5b