From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: kvm-devel <kvm@vger.kernel.org>,
qemu-devel <qemu-devel@nongnu.org>,
lf-virt <virtualization@lists.linux-foundation.org>,
Anthony Liguori <aliguori@linux.vnet.ibm.com>,
target-devel <target-devel@vger.kernel.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 3/3] vhost: Only call vhost_verify_ring_mappings when adding vhost memory
Date: Thu, 28 Mar 2013 00:15:45 +0200 [thread overview]
Message-ID: <20130327221545.GA12518@redhat.com> (raw)
In-Reply-To: <1364421586-29857-4-git-send-email-nab@linux-iscsi.org>
On Wed, Mar 27, 2013 at 09:59:46PM +0000, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> 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 <mst@redhat.com>
> Date: Tue Dec 25 17:41:07 2012 +0200
>
> vhost: set started flag while start is in progress
>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Asias He <asias@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-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
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: kvm-devel <kvm@vger.kernel.org>,
qemu-devel <qemu-devel@nongnu.org>,
lf-virt <virtualization@lists.linux-foundation.org>,
Anthony Liguori <aliguori@linux.vnet.ibm.com>,
target-devel <target-devel@vger.kernel.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>, Asias He <asias@redhat.com>
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 [thread overview]
Message-ID: <20130327221545.GA12518@redhat.com> (raw)
In-Reply-To: <1364421586-29857-4-git-send-email-nab@linux-iscsi.org>
On Wed, Mar 27, 2013 at 09:59:46PM +0000, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> 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 <mst@redhat.com>
> Date: Tue Dec 25 17:41:07 2012 +0200
>
> vhost: set started flag while start is in progress
>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Asias He <asias@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-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
next prev parent reply other threads:[~2013-03-27 22:15 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-27 21:59 [PATCH 0/3] Add support for vhost-scsi-pci Nicholas A. Bellinger
2013-03-27 21:59 ` [Qemu-devel] " Nicholas A. Bellinger
2013-03-27 21:59 ` [PATCH 1/3] virtio-scsi: create VirtIOSCSICommon Nicholas A. Bellinger
2013-03-27 21:59 ` [Qemu-devel] " Nicholas A. Bellinger
2013-03-27 21:59 ` [PATCH 2/3] vhost-scsi: new device supporting the tcm_vhost Linux kernel module Nicholas A. Bellinger
2013-03-27 21:59 ` [Qemu-devel] " Nicholas A. Bellinger
2013-03-27 22:28 ` Michael S. Tsirkin
2013-03-27 22:28 ` [Qemu-devel] " Michael S. Tsirkin
2013-03-27 22:45 ` Nicholas A. Bellinger
2013-03-27 22:45 ` [Qemu-devel] " Nicholas A. Bellinger
2013-03-27 22:50 ` Michael S. Tsirkin
2013-03-27 22:50 ` [Qemu-devel] " Michael S. Tsirkin
2013-03-27 22:53 ` Michael S. Tsirkin
2013-03-27 22:53 ` Michael S. Tsirkin
2013-03-27 22:53 ` [Qemu-devel] " Michael S. Tsirkin
2013-03-27 23:24 ` Nicholas A. Bellinger
2013-03-27 23:24 ` Nicholas A. Bellinger
2013-03-27 23:24 ` [Qemu-devel] " Nicholas A. Bellinger
2013-03-28 0:21 ` Nicholas A. Bellinger
2013-03-28 0:21 ` [Qemu-devel] " Nicholas A. Bellinger
2013-03-28 6:19 ` Michael S. Tsirkin
2013-03-28 6:19 ` [Qemu-devel] " Michael S. Tsirkin
2013-03-28 6:28 ` Nicholas A. Bellinger
2013-03-28 6:28 ` [Qemu-devel] " Nicholas A. Bellinger
2013-03-28 16:54 ` Michael S. Tsirkin
2013-03-28 16:54 ` [Qemu-devel] " Michael S. Tsirkin
2013-03-28 6:28 ` Nicholas A. Bellinger
2013-03-27 23:05 ` Nicholas A. Bellinger
2013-03-27 23:05 ` [Qemu-devel] " Nicholas A. Bellinger
2013-03-27 23:05 ` Nicholas A. Bellinger
2013-03-27 22:28 ` Michael S. Tsirkin
2013-03-27 21:59 ` Nicholas A. Bellinger
2013-03-27 21:59 ` [PATCH 3/3] vhost: Only call vhost_verify_ring_mappings when adding vhost memory Nicholas A. Bellinger
2013-03-27 21:59 ` Nicholas A. Bellinger
2013-03-27 21:59 ` [Qemu-devel] " Nicholas A. Bellinger
2013-03-27 22:15 ` Michael S. Tsirkin [this message]
2013-03-27 22:15 ` Michael S. Tsirkin
2013-03-27 22:16 ` [PATCH 0/3] Add support for vhost-scsi-pci Michael S. Tsirkin
2013-03-27 22:16 ` [Qemu-devel] " Michael S. Tsirkin
2013-03-27 22:16 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130327221545.GA12518@redhat.com \
--to=mst@redhat.com \
--cc=aliguori@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=target-devel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.