From: Peng Tao <bergwolf@gmail.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: netdev@vger.kernel.org, stable@vger.kernel.org#4.8+,
Peng Tao <bergwolf@gmail.com>,
kvm@vger.kernel.org, virtualization@lists.linux-foundation.org
Subject: [PATCH] vhost-vsock: fix orphan connection reset
Date: Wed, 7 Dec 2016 17:45:47 +0800 [thread overview]
Message-ID: <1481103947-76771-1-git-send-email-bergwolf@gmail.com> (raw)
local_addr.svm_cid is host cid. We should check guest cid instead,
which is remote_addr.svm_cid.
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: stable@vger.kernel.org #4.8+
Signed-off-by: Peng Tao <bergwolf@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
next reply other threads:[~2016-12-07 9:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 9:45 Peng Tao [this message]
2016-12-08 9:19 ` [PATCH] vhost-vsock: fix orphan connection reset Stefan Hajnoczi
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=1481103947-76771-1-git-send-email-bergwolf@gmail.com \
--to=bergwolf@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org#4.8+ \
--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).