* [PATCH] VSOCK: call sk->sk_data_ready() on accept()
@ 2015-11-04 12:58 Stefan Hajnoczi
2015-11-05 3:03 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hajnoczi @ 2015-11-04 12:58 UTC (permalink / raw)
To: netdev
Cc: Thomas Hellstrom, Aditya Asarwade, David S. Miller, Jorgen Hansen,
linux-kernel, Stefan Hajnoczi
When a listen socket enqueues a connection for userspace to accept(),
the sk->sk_data_ready() callback should be invoked. In-kernel socket
users rely on this callback to detect when incoming connections are
available.
Currently the sk->sk_state_change() callback is invoked by
vmci_transport.c. This happens to work for userspace applications since
sk->sk_state_change = sock_def_wakeup() and sk->sk_data_ready =
sock_def_readable() both wake up the accept() waiter. In-kernel socket
users, on the other hand, fail to detect incoming connections.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
net/vmw_vsock/vmci_transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
index 7555cad..9363abb 100644
--- a/net/vmw_vsock/vmci_transport.c
+++ b/net/vmw_vsock/vmci_transport.c
@@ -1236,7 +1236,7 @@ vmci_transport_recv_connecting_server(struct sock *listener,
/* Callers of accept() will be be waiting on the listening socket, not
* the pending socket.
*/
- listener->sk_state_change(listener);
+ listener->sk_data_ready(listener);
return 0;
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] VSOCK: call sk->sk_data_ready() on accept()
2015-11-04 12:58 [PATCH] VSOCK: call sk->sk_data_ready() on accept() Stefan Hajnoczi
@ 2015-11-05 3:03 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-11-05 3:03 UTC (permalink / raw)
To: stefanha; +Cc: netdev, thellstrom, asarwade, jhansen, linux-kernel
From: Stefan Hajnoczi <stefanha@redhat.com>
Date: Wed, 4 Nov 2015 12:58:42 +0000
> When a listen socket enqueues a connection for userspace to accept(),
> the sk->sk_data_ready() callback should be invoked. In-kernel socket
> users rely on this callback to detect when incoming connections are
> available.
>
> Currently the sk->sk_state_change() callback is invoked by
> vmci_transport.c. This happens to work for userspace applications since
> sk->sk_state_change = sock_def_wakeup() and sk->sk_data_ready =
> sock_def_readable() both wake up the accept() waiter. In-kernel socket
> users, on the other hand, fail to detect incoming connections.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-05 3:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-04 12:58 [PATCH] VSOCK: call sk->sk_data_ready() on accept() Stefan Hajnoczi
2015-11-05 3:03 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).