local_addr.svm_cid is host cid. We should check guest cid instead, which is remote_addr.svm_cid. Cc: Stefan Hajnoczi <stefanha at redhat.com> Cc: stable at vger.kernel.org #4.8+ Signed-off-by: Peng Tao <bergwolf at gmail.com> --- drivers/vhost/vsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index e3b30ea..a504e2e0 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -506,7 +506,7 @@ static void vhost_vsock_reset_orphans(struct sock *sk) * executing. */ - if (!vhost_vsock_get(vsk->local_addr.svm_cid)) { + if (!vhost_vsock_get(vsk->remote_addr.svm_cid)) { sock_set_flag(sk, SOCK_DONE); vsk->peer_shutdown = SHUTDOWN_MASK; sk->sk_state = SS_UNCONNECTED; -- 2.7.4
On Wed, Dec 07, 2016 at 05:45:47PM +0800, Peng Tao wrote:> local_addr.svm_cid is host cid. We should check guest cid instead, > which is remote_addr.svm_cid. > > Cc: Stefan Hajnoczi <stefanha at redhat.com> > Cc: stable at vger.kernel.org #4.8+ > Signed-off-by: Peng Tao <bergwolf at gmail.com> > --- > drivers/vhost/vsock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 455 bytes Desc: not available URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20161208/85203e94/attachment.sig>
Maybe Matching Threads
- [PATCH] vhost-vsock: fix orphan connection reset
- [PATCH-RESEND] vhost-vsock: fix orphan connection reset
- [PATCH-RESEND] vhost-vsock: fix orphan connection reset
- [PATCH v4 2/4] vhost-vsock: add pkt cancel capability
- [PATCH v4 2/4] vhost-vsock: add pkt cancel capability