[azure 4.13][PATCH 01/19] Revert "UBUNTU: SAUCE: hv-sock: avoid double FINs if shutdown() is called"

Marcelo Henrique Cerri marcelo.cerri at canonical.com
Tue Dec 12 15:41:50 UTC 2017


From: Dexuan Cui <decui at microsoft.com>

BugLink: http://bugs.launchpad.net/bugs/1736283

This reverts commit a2dba2b09a19ee425f3e06ac1e078b0c7691c64a.

Signed-off-by: Dexuan Cui <decui at microsoft.com>
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri at canonical.com>
---
 net/vmw_vsock/hyperv_transport.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c
index 24e89129e3e3..76c0b9802376 100644
--- a/net/vmw_vsock/hyperv_transport.c
+++ b/net/vmw_vsock/hyperv_transport.c
@@ -95,9 +95,6 @@ struct hvsock {
 	u32 recv_data_len;
 	/* The offset of the payload */
 	u32 recv_data_off;
-
-	/* Have we sent the zero-length packet (FIN)? */
-	unsigned long fin_sent;
 };
 
 /* In the VM, we support Hyper-V Sockets with AF_VSOCK, and the endpoint is
@@ -422,9 +419,6 @@ static int hvs_shutdown(struct vsock_sock *vsk, int mode)
 
 	hvs = vsk->trans;
 
-	if (test_and_set_bit(0, &hvs->fin_sent))
-		return 0;
-
 	send_buf = (struct hvs_send_buf *)&hdr;
 
 	/* It can't fail: see hvs_channel_writable_bytes(). */
-- 
2.7.4





More information about the kernel-team mailing list