virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: adelva@google.com, Jiyong Park <jiyong@google.com>,
	kvm@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH v3] vsock: each transport cycles only on its own sockets
Date: Thu, 10 Mar 2022 10:28:03 -0500	[thread overview]
Message-ID: <20220310102636-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220310141420.lsdchdfcybzmdhnz@sgarzare-redhat>

On Thu, Mar 10, 2022 at 03:14:20PM +0100, Stefano Garzarella wrote:
> On Thu, Mar 10, 2022 at 10:50:11PM +0900, Jiyong Park wrote:
> > When iterating over sockets using vsock_for_each_connected_socket, make
> > sure that a transport filters out sockets that don't belong to the
> > transport.
> > 
> > There actually was an issue caused by this; in a nested VM
> > configuration, destroying the nested VM (which often involves the
> > closing of /dev/vhost-vsock if there was h2g connections to the nested
> > VM) kills not only the h2g connections, but also all existing g2h
> > connections to the (outmost) host which are totally unrelated.
> > 
> > Tested: Executed the following steps on Cuttlefish (Android running on a
> > VM) [1]: (1) Enter into an `adb shell` session - to have a g2h
> > connection inside the VM, (2) open and then close /dev/vhost-vsock by
> > `exec 3< /dev/vhost-vsock && exec 3<&-`, (3) observe that the adb
> > session is not reset.
> > 
> > [1] https://android.googlesource.com/device/google/cuttlefish/
> > 
> > Fixes: c0cfa2d8a788 ("vsock: add multi-transports support")
> > Signed-off-by: Jiyong Park <jiyong@google.com>
> > ---
> > Changes in v3:
> >  - Fixed the build error in vmci_transport.c
> > Changes in v2:
> >  - Squashed into a single patch
> > 
> > drivers/vhost/vsock.c            | 3 ++-
> > include/net/af_vsock.h           | 3 ++-
> > net/vmw_vsock/af_vsock.c         | 9 +++++++--
> > net/vmw_vsock/virtio_transport.c | 7 +++++--
> > net/vmw_vsock/vmci_transport.c   | 5 ++++-
> > 5 files changed, 20 insertions(+), 7 deletions(-)
> 
> It seems okay now, I ran my test suite and everything seems to be fine:
> 
> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
> 
> Thanks,
> Stefanoc

Thanks!
Acked-by: Michael S. Tsirkin <mst@redhat.com>

Not a new regression so I think we should take this in the next cycle,
let's be careful here especially since previous version was not even
build-tested by the contributor.

-- 
MST

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

      reply	other threads:[~2022-03-10 15:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220310135012.175219-1-jiyong@google.com>
2022-03-10 14:14 ` [PATCH v3] vsock: each transport cycles only on its own sockets Stefano Garzarella
2022-03-10 15:28   ` Michael S. Tsirkin [this message]

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=20220310102636-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=adelva@google.com \
    --cc=davem@davemloft.net \
    --cc=jiyong@google.com \
    --cc=kuba@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).