diff options
| author | Stefan Hajnoczi <stefanha@redhat.com> | 2016-07-28 15:36:31 +0100 |
|---|---|---|
| committer | Alistair Strachan <astrachan@google.com> | 2019-05-14 17:56:56 -0700 |
| commit | f477c730c32ccb3fd1c8e29bb1520edfbb5f1bfb (patch) | |
| tree | 227ab3d890f96231ac5e1d5a0bc9db1b34c0a95a /include | |
| parent | bcb6d9e1950c8e2d301e0713bf25e29bcc70bf69 (diff) | |
UPSTREAM: VSOCK: defer sock removal to transports
The virtio transport will implement graceful shutdown and the related
SO_LINGER socket option. This requires orphaning the sock but keeping
it in the table of connections after .release().
This patch adds the vsock_remove_sock() function and leaves it up to the
transport when to remove the sock.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 6773b7dc39f165bd9d824b50ac52cbb3f87d53c8)
Bug: 121166534
Test: Ran cuttlefish with android-4.4 + VSOCKETS, VMWARE_VMCI_VSOCKETS
Signed-off-by: Cody Schuffelen <schuffelen@google.com>
Change-Id: I889cdbc0b1de8d2ff54a70ab7a6b4623edb3de06
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/af_vsock.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h index 2f987679239b..d8a1a41d5f8f 100644 --- a/include/net/af_vsock.h +++ b/include/net/af_vsock.h @@ -180,6 +180,7 @@ void vsock_remove_connected(struct vsock_sock *vsk); struct sock *vsock_find_bound_socket(struct sockaddr_vm *addr); struct sock *vsock_find_connected_socket(struct sockaddr_vm *src, struct sockaddr_vm *dst); +void vsock_remove_sock(struct vsock_sock *vsk); void vsock_for_each_connected_socket(void (*fn)(struct sock *sk)); #endif /* __AF_VSOCK_H__ */ |
