[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [PATCH] vhost-scsi: init backend features earlier
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-stable] [PATCH] vhost-scsi: init backend features earlier |
Date: |
Wed, 03 Sep 2014 11:08:00 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
Il 03/09/2014 11:02, Michael S. Tsirkin ha scritto:
> As vhost core uses backend_features during init,
> clear it earlier to avoid using uninitialized
> memory.
> This is harmless since vhost scsi ignores the result
> anyway, but it avoids valgrind errors.
>
> Cc: address@hidden
> Cc: Jason Wang <address@hidden>
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> ---
> hw/scsi/vhost-scsi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
> index ddfe76a..7146e0e 100644
> --- a/hw/scsi/vhost-scsi.c
> +++ b/hw/scsi/vhost-scsi.c
> @@ -238,6 +238,7 @@ static void vhost_scsi_realize(DeviceState *dev, Error
> **errp)
> s->dev.nvqs = VHOST_SCSI_VQ_NUM_FIXED + vs->conf.num_queues;
> s->dev.vqs = g_new(struct vhost_virtqueue, s->dev.nvqs);
> s->dev.vq_index = 0;
> + s->dev.backend_features = 0;
>
> ret = vhost_dev_init(&s->dev, (void *)(uintptr_t)vhostfd,
> VHOST_BACKEND_TYPE_KERNEL, true);
> @@ -246,7 +247,6 @@ static void vhost_scsi_realize(DeviceState *dev, Error
> **errp)
> strerror(-ret));
> return;
> }
> - s->dev.backend_features = 0;
>
> error_setg(&s->migration_blocker,
> "vhost-scsi does not support migration");
>
Acked-by: Paolo Bonzini <address@hidden>
want to keep it in your treee?
Paolo