vhost-vsock: fix orphan connection reset
Subsystems (6)
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.
---
resending because the last attempt looks to be dropped by vger.
drivers/vhost/vsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vhost/vsock.c +1 -1
@@ -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 ;
Signature · 1 line
2.7.4
David Miller
maintainerFrom: Peng Tao <[email protected]>
Date: Fri, 9 Dec 2016 01:10:46 +0800
Quoted 7 lines
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 [email protected] [4.8+]Reviewed-by Stefan Hajnoczi <[email protected]>Signed-off-by Peng Tao <[email protected]>
Applied and queued up for -stable, thanks.
David Miller
maintainerFrom: Peng Tao <[email protected]>
Date: Fri, 9 Dec 2016 01:10:46 +0800
Quoted 7 lines
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 [email protected] [4.8+]Reviewed-by Stefan Hajnoczi <[email protected]>Signed-off-by Peng Tao <[email protected]>
Applied and queued up for -stable, thanks.