Displaying 20 results from an estimated 68 matches for "vsock_find_connected_socket".
2019 Nov 28
5
[RFC PATCH 0/3] vsock: support network namespace
Hi,
now that we have multi-transport upstream, I started to take a look to
support network namespace (netns) in vsock.
As we partially discussed in the multi-transport proposal [1], it could
be nice to support network namespace in vsock to reach the following
goals:
- isolate host applications from guest applications using the same ports
with CID_ANY
- assign the same CID of VMs running in
2019 Nov 28
5
[RFC PATCH 0/3] vsock: support network namespace
Hi,
now that we have multi-transport upstream, I started to take a look to
support network namespace (netns) in vsock.
As we partially discussed in the multi-transport proposal [1], it could
be nice to support network namespace in vsock to reach the following
goals:
- isolate host applications from guest applications using the same ports
with CID_ANY
- assign the same CID of VMs running in
2015 May 27
0
[RFC 1/6] VSOCK: Introduce vsock_find_unbound_socket and vsock_bind_dgram_generic
...d vsock_insert_connected(struct vsock_sock *vsk);
void vsock_remove_bound(struct vsock_sock *vsk);
void vsock_remove_connected(struct vsock_sock *vsk);
struct sock *vsock_find_bound_socket(struct sockaddr_vm *addr);
+struct sock *vsock_find_unbound_socket(struct sockaddr_vm *addr);
struct sock *vsock_find_connected_socket(struct sockaddr_vm *src,
struct sockaddr_vm *dst);
void vsock_for_each_connected_socket(void (*fn)(struct sock *sk));
+int vsock_bind_dgram_generic(struct vsock_sock *vsk, struct sockaddr_vm *addr);
#endif /* __AF_VSOCK_H__ */
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsoc...
2019 Jun 13
2
[PATCH net-next] vsock: correct removal of socket from the list
...cted(struct vsock_sock *vsk)
{
spin_lock_bh(&vsock_table_lock);
- __vsock_remove_connected(vsk);
+ if (__vsock_in_connected_table(vsk))
+ __vsock_remove_connected(vsk);
spin_unlock_bh(&vsock_table_lock);
}
EXPORT_SYMBOL_GPL(vsock_remove_connected);
@@ -326,35 +328,10 @@ struct sock *vsock_find_connected_socket(struct sockaddr_vm *src,
}
EXPORT_SYMBOL_GPL(vsock_find_connected_socket);
-static bool vsock_in_bound_table(struct vsock_sock *vsk)
-{
- bool ret;
-
- spin_lock_bh(&vsock_table_lock);
- ret = __vsock_in_bound_table(vsk);
- spin_unlock_bh(&vsock_table_lock);
-
- return ret;
-}
-
-static...
2019 Jun 13
2
[PATCH net-next] vsock: correct removal of socket from the list
...cted(struct vsock_sock *vsk)
{
spin_lock_bh(&vsock_table_lock);
- __vsock_remove_connected(vsk);
+ if (__vsock_in_connected_table(vsk))
+ __vsock_remove_connected(vsk);
spin_unlock_bh(&vsock_table_lock);
}
EXPORT_SYMBOL_GPL(vsock_remove_connected);
@@ -326,35 +328,10 @@ struct sock *vsock_find_connected_socket(struct sockaddr_vm *src,
}
EXPORT_SYMBOL_GPL(vsock_find_connected_socket);
-static bool vsock_in_bound_table(struct vsock_sock *vsk)
-{
- bool ret;
-
- spin_lock_bh(&vsock_table_lock);
- ret = __vsock_in_bound_table(vsk);
- spin_unlock_bh(&vsock_table_lock);
-
- return ret;
-}
-
-static...
2019 May 01
3
[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver
...00080050033
[ 4.211379] CR2: ffffffffffffffe8 CR3: 000000002820e001 CR4: 00000000001606e0
[ 4.211379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 4.211379] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 4.211379] Call Trace:
[ 4.211379] ? vsock_find_connected_socket+0x6c/0xe0
[ 4.211379] virtio_transport_recv_pkt+0x15f/0x740
[ 4.211379] ? detach_buf+0x1b5/0x210
[ 4.211379] virtio_transport_rx_work+0xb7/0x140
[ 4.211379] process_one_work+0x1ef/0x480
[ 4.211379] worker_thread+0x312/0x460
[ 4.211379] kthread+0x132/0x140
[ 4.211379] ? p...
2019 May 01
3
[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver
...00080050033
[ 4.211379] CR2: ffffffffffffffe8 CR3: 000000002820e001 CR4: 00000000001606e0
[ 4.211379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 4.211379] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 4.211379] Call Trace:
[ 4.211379] ? vsock_find_connected_socket+0x6c/0xe0
[ 4.211379] virtio_transport_recv_pkt+0x15f/0x740
[ 4.211379] ? detach_buf+0x1b5/0x210
[ 4.211379] virtio_transport_rx_work+0xb7/0x140
[ 4.211379] process_one_work+0x1ef/0x480
[ 4.211379] worker_thread+0x312/0x460
[ 4.211379] kthread+0x132/0x140
[ 4.211379] ? p...
2019 May 02
2
[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver
...ffffffe8 CR3: 000000002820e001 CR4: 00000000001606e0
> > [ 4.211379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > [ 4.211379] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> > [ 4.211379] Call Trace:
> > [ 4.211379] ? vsock_find_connected_socket+0x6c/0xe0
> > [ 4.211379] virtio_transport_recv_pkt+0x15f/0x740
> > [ 4.211379] ? detach_buf+0x1b5/0x210
> > [ 4.211379] virtio_transport_rx_work+0xb7/0x140
> > [ 4.211379] process_one_work+0x1ef/0x480
> > [ 4.211379] worker_thread+0x312/0x460
>...
2019 May 02
2
[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver
...ffffffe8 CR3: 000000002820e001 CR4: 00000000001606e0
> > [ 4.211379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > [ 4.211379] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> > [ 4.211379] Call Trace:
> > [ 4.211379] ? vsock_find_connected_socket+0x6c/0xe0
> > [ 4.211379] virtio_transport_recv_pkt+0x15f/0x740
> > [ 4.211379] ? detach_buf+0x1b5/0x210
> > [ 4.211379] virtio_transport_rx_work+0xb7/0x140
> > [ 4.211379] process_one_work+0x1ef/0x480
> > [ 4.211379] worker_thread+0x312/0x460
>...
2019 May 16
2
[PATCH RESEND] vsock/virtio: Initialize core virtio vsock before registering the driver
...00080050033
[ 4.211379] CR2: ffffffffffffffe8 CR3: 000000002820e001 CR4: 00000000001606e0
[ 4.211379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 4.211379] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 4.211379] Call Trace:
[ 4.211379] ? vsock_find_connected_socket+0x6c/0xe0
[ 4.211379] virtio_transport_recv_pkt+0x15f/0x740
[ 4.211379] ? detach_buf+0x1b5/0x210
[ 4.211379] virtio_transport_rx_work+0xb7/0x140
[ 4.211379] process_one_work+0x1ef/0x480
[ 4.211379] worker_thread+0x312/0x460
[ 4.211379] kthread+0x132/0x140
[ 4.211379] ? p...
2019 May 16
2
[PATCH RESEND] vsock/virtio: Initialize core virtio vsock before registering the driver
...00080050033
[ 4.211379] CR2: ffffffffffffffe8 CR3: 000000002820e001 CR4: 00000000001606e0
[ 4.211379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 4.211379] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 4.211379] Call Trace:
[ 4.211379] ? vsock_find_connected_socket+0x6c/0xe0
[ 4.211379] virtio_transport_recv_pkt+0x15f/0x740
[ 4.211379] ? detach_buf+0x1b5/0x210
[ 4.211379] virtio_transport_rx_work+0xb7/0x140
[ 4.211379] process_one_work+0x1ef/0x480
[ 4.211379] worker_thread+0x312/0x460
[ 4.211379] kthread+0x132/0x140
[ 4.211379] ? p...
2019 May 06
1
[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver
...002820e001 CR4: 00000000001606e0
> > > [ 4.211379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > > [ 4.211379] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> > > [ 4.211379] Call Trace:
> > > [ 4.211379] ? vsock_find_connected_socket+0x6c/0xe0
> > > [ 4.211379] virtio_transport_recv_pkt+0x15f/0x740
> > > [ 4.211379] ? detach_buf+0x1b5/0x210
> > > [ 4.211379] virtio_transport_rx_work+0xb7/0x140
> > > [ 4.211379] process_one_work+0x1ef/0x480
> > > [ 4.211379] worker...
2019 May 15
2
[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver
...t; > > > [ 4.211379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > > > > [ 4.211379] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> > > > > [ 4.211379] Call Trace:
> > > > > [ 4.211379] ? vsock_find_connected_socket+0x6c/0xe0
> > > > > [ 4.211379] virtio_transport_recv_pkt+0x15f/0x740
> > > > > [ 4.211379] ? detach_buf+0x1b5/0x210
> > > > > [ 4.211379] virtio_transport_rx_work+0xb7/0x140
> > > > > [ 4.211379] process_one_work+0x1ef/0x4...
2019 May 15
2
[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver
...t; > > > [ 4.211379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > > > > [ 4.211379] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> > > > > [ 4.211379] Call Trace:
> > > > > [ 4.211379] ? vsock_find_connected_socket+0x6c/0xe0
> > > > > [ 4.211379] virtio_transport_recv_pkt+0x15f/0x740
> > > > > [ 4.211379] ? detach_buf+0x1b5/0x210
> > > > > [ 4.211379] virtio_transport_rx_work+0xb7/0x140
> > > > > [ 4.211379] process_one_work+0x1ef/0x4...
2023 Jun 01
0
[PATCH net] virtio/vsock: fix sock refcnt bug on owner set failure
On Wed, May 31, 2023 at 07:47:32PM +0000, Bobby Eshleman wrote:
>Previous to setting the owner the socket is found via
>vsock_find_connected_socket(), which returns sk after a call to
>sock_hold().
>
>If setting the owner fails, then sock_put() needs to be called.
>
>Fixes: f9d2b1e146e0 ("virtio/vsock: fix leaks due to missing skb owner")
>Signed-off-by: Bobby Eshleman <bobby.eshleman at bytedance.com>
>---...
2019 May 16
0
[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver
...11379] CR2: ffffffffffffffe8 CR3: 000000002820e001 CR4: 00000000001606e0
> [ 4.211379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> [ 4.211379] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> [ 4.211379] Call Trace:
> [ 4.211379] ? vsock_find_connected_socket+0x6c/0xe0
> [ 4.211379] virtio_transport_recv_pkt+0x15f/0x740
> [ 4.211379] ? detach_buf+0x1b5/0x210
> [ 4.211379] virtio_transport_rx_work+0xb7/0x140
> [ 4.211379] process_one_work+0x1ef/0x480
> [ 4.211379] worker_thread+0x312/0x460
> [ 4.211379] kthread+0...
2019 May 17
0
[PATCH RESEND] vsock/virtio: Initialize core virtio vsock before registering the driver
...11379] CR2: ffffffffffffffe8 CR3: 000000002820e001 CR4: 00000000001606e0
> [ 4.211379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> [ 4.211379] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> [ 4.211379] Call Trace:
> [ 4.211379] ? vsock_find_connected_socket+0x6c/0xe0
> [ 4.211379] virtio_transport_recv_pkt+0x15f/0x740
> [ 4.211379] ? detach_buf+0x1b5/0x210
> [ 4.211379] virtio_transport_rx_work+0xb7/0x140
> [ 4.211379] process_one_work+0x1ef/0x480
> [ 4.211379] worker_thread+0x312/0x460
> [ 4.211379] kthread+0...
2019 May 23
0
[PATCH 4.9 07/53] vsock/virtio: Initialize core virtio vsock before registering the driver
...00080050033
[ 4.211379] CR2: ffffffffffffffe8 CR3: 000000002820e001 CR4: 00000000001606e0
[ 4.211379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 4.211379] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 4.211379] Call Trace:
[ 4.211379] ? vsock_find_connected_socket+0x6c/0xe0
[ 4.211379] virtio_transport_recv_pkt+0x15f/0x740
[ 4.211379] ? detach_buf+0x1b5/0x210
[ 4.211379] virtio_transport_rx_work+0xb7/0x140
[ 4.211379] process_one_work+0x1ef/0x480
[ 4.211379] worker_thread+0x312/0x460
[ 4.211379] kthread+0x132/0x140
[ 4.211379] ? p...
2019 May 23
0
[PATCH 4.14 09/77] vsock/virtio: Initialize core virtio vsock before registering the driver
...00080050033
[ 4.211379] CR2: ffffffffffffffe8 CR3: 000000002820e001 CR4: 00000000001606e0
[ 4.211379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 4.211379] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 4.211379] Call Trace:
[ 4.211379] ? vsock_find_connected_socket+0x6c/0xe0
[ 4.211379] virtio_transport_recv_pkt+0x15f/0x740
[ 4.211379] ? detach_buf+0x1b5/0x210
[ 4.211379] virtio_transport_rx_work+0xb7/0x140
[ 4.211379] process_one_work+0x1ef/0x480
[ 4.211379] worker_thread+0x312/0x460
[ 4.211379] kthread+0x132/0x140
[ 4.211379] ? p...
2019 May 23
0
[PATCH 4.19 014/114] vsock/virtio: Initialize core virtio vsock before registering the driver
...00080050033
[ 4.211379] CR2: ffffffffffffffe8 CR3: 000000002820e001 CR4: 00000000001606e0
[ 4.211379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 4.211379] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 4.211379] Call Trace:
[ 4.211379] ? vsock_find_connected_socket+0x6c/0xe0
[ 4.211379] virtio_transport_recv_pkt+0x15f/0x740
[ 4.211379] ? detach_buf+0x1b5/0x210
[ 4.211379] virtio_transport_rx_work+0xb7/0x140
[ 4.211379] process_one_work+0x1ef/0x480
[ 4.211379] worker_thread+0x312/0x460
[ 4.211379] kthread+0x132/0x140
[ 4.211379] ? p...