Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1262267
| From | Stefan Hajnoczi <stefanha@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] VSOCK: call sk->sk_data_ready() on accept() |
| Date | 2015-11-04 14:00 +0100 |
| Message-ID | <qr5Ps-yZ-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] VSOCK: call sk->sk_data_ready() on accept() Stefan Hajnoczi <stefanha@redhat.com> - 2015-11-04 14:00 +0100 Re: [PATCH] VSOCK: call sk->sk_data_ready() on accept() David Miller <davem@davemloft.net> - 2015-11-05 04:10 +0100
csiph-web