]> git.baikalelectronics.ru Git - kernel.git/commit
VSOCK: call sk->sk_data_ready() on accept()
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 4 Nov 2015 12:58:42 +0000 (12:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Nov 2015 03:03:10 +0000 (22:03 -0500)
commit991afe8fdac5e437c86dac336bfc5936a6936824
tree778462f9edd824275b8fe7469d9a860800e87ac1
parent02ba1c3dfe9dbd8092d307da4685b74e52f524f2
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>
net/vmw_vsock/vmci_transport.c