diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2015-11-04 12:58:42 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-11-04 22:03:10 -0500 |
commit | 7362945aea72fccc9df4f4e7643c971e0a8c33dc (patch) | |
tree | 778462f9edd824275b8fe7469d9a860800e87ac1 | |
parent | f63ce5b6fa5e9a0faf7a0e1ef2993a502878c78a (diff) | |
download | linux-7362945aea72fccc9df4f4e7643c971e0a8c33dc.tar.gz linux-7362945aea72fccc9df4f4e7643c971e0a8c33dc.tar.bz2 linux-7362945aea72fccc9df4f4e7643c971e0a8c33dc.zip |
VSOCK: call sk->sk_data_ready() on accept()
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/vmw_vsock/vmci_transport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c index 400d87294de3..0a369bb440e7 100644 --- a/net/vmw_vsock/vmci_transport.c +++ b/net/vmw_vsock/vmci_transport.c @@ -1234,7 +1234,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; |