[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/3] vhost: Only call vhost_verify_ring_mappings
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH 3/3] vhost: Only call vhost_verify_ring_mappings when adding vhost memory |
Date: |
Thu, 28 Mar 2013 00:15:45 +0200 |
On Wed, Mar 27, 2013 at 09:59:46PM +0000, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <address@hidden>
>
> This patch fixes a bug where vhost_verify_ring_mappings() could be
> called after vhost_dev_unassign_memory() has been called during
> vhost_set_memory(..., add=false).
>
Sorry, I NAK'd this already.
Is a memory including the rings unassigned then?
How can this happen?
We need to debug wht's going on here.
> This appears to be fallout from when dev->started = true assignment
> occurs before vhost_set_memory(..., add=false) is called in:
>
> commit 24f4fe345c1b80bab1ee18573914123d8028a9e6
> Author: Michael S. Tsirkin <address@hidden>
> Date: Tue Dec 25 17:41:07 2012 +0200
>
> vhost: set started flag while start is in progress
>
> Cc: Michael S. Tsirkin <address@hidden>
> Cc: Asias He <address@hidden>
> Cc: Paolo Bonzini <address@hidden>
> Signed-off-by: Nicholas Bellinger <address@hidden>
-net seems to work fine with that patch.
> ---
> hw/vhost.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/vhost.c b/hw/vhost.c
> index 4d6aee3..687a689 100644
> --- a/hw/vhost.c
> +++ b/hw/vhost.c
> @@ -421,7 +421,7 @@ static void vhost_set_memory(MemoryListener *listener,
> return;
> }
>
> - if (dev->started) {
> + if (dev->started && add) {
> r = vhost_verify_ring_mappings(dev, start_addr, size);
> assert(r >= 0);
> }
> --
> 1.7.2.5
- [Qemu-devel] [PATCH 0/3] Add support for vhost-scsi-pci, Nicholas A. Bellinger, 2013/03/27
- [Qemu-devel] [PATCH 3/3] vhost: Only call vhost_verify_ring_mappings when adding vhost memory, Nicholas A. Bellinger, 2013/03/27
- Re: [Qemu-devel] [PATCH 3/3] vhost: Only call vhost_verify_ring_mappings when adding vhost memory,
Michael S. Tsirkin <=
- [Qemu-devel] [PATCH 1/3] virtio-scsi: create VirtIOSCSICommon, Nicholas A. Bellinger, 2013/03/27
- [Qemu-devel] [PATCH 2/3] vhost-scsi: new device supporting the tcm_vhost Linux kernel module, Nicholas A. Bellinger, 2013/03/27
- Re: [Qemu-devel] [PATCH 2/3] vhost-scsi: new device supporting the tcm_vhost Linux kernel module, Michael S. Tsirkin, 2013/03/27
- Re: [Qemu-devel] [PATCH 2/3] vhost-scsi: new device supporting the tcm_vhost Linux kernel module, Nicholas A. Bellinger, 2013/03/27
- Re: [Qemu-devel] [PATCH 2/3] vhost-scsi: new device supporting the tcm_vhost Linux kernel module, Michael S. Tsirkin, 2013/03/27
- Re: [Qemu-devel] [PATCH 2/3] vhost-scsi: new device supporting the tcm_vhost Linux kernel module, Michael S. Tsirkin, 2013/03/27
- Re: [Qemu-devel] [PATCH 2/3] vhost-scsi: new device supporting the tcm_vhost Linux kernel module, Nicholas A. Bellinger, 2013/03/27
- Re: [Qemu-devel] [PATCH 2/3] vhost-scsi: new device supporting the tcm_vhost Linux kernel module, Nicholas A. Bellinger, 2013/03/27
- Re: [Qemu-devel] [PATCH 2/3] vhost-scsi: new device supporting the tcm_vhost Linux kernel module, Michael S. Tsirkin, 2013/03/28
- Re: [Qemu-devel] [PATCH 2/3] vhost-scsi: new device supporting the tcm_vhost Linux kernel module, Nicholas A. Bellinger, 2013/03/28