提交 c4587631 编写于 作者: P Peng Tao 提交者: David S. Miller

vhost-vsock: fix orphan connection reset

local_addr.svm_cid is host cid. We should check guest cid instead,
which is remote_addr.svm_cid. Otherwise we end up resetting all
connections to all guests.

Cc: stable@vger.kernel.org [4.8+]
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: NPeng Tao <bergwolf@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1e97426d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册