diff options
author | Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> | 2016-11-01 14:02:35 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-01 11:53:23 -0400 |
commit | 4891d8fe16343660b4c1ddbcca4792300b5fd4f4 (patch) | |
tree | f3ad15f6e2f7ea777faae2667cb5643f3bc5670c /net/tipc | |
parent | 7cf87fa27873a954f2d665dfc61fc22227d96ad8 (diff) | |
download | linux-4891d8fe16343660b4c1ddbcca4792300b5fd4f4.tar.bz2 |
tipc: wakeup sleeping users at disconnect
Until now, in filter_connect() when we terminate a connection due to
an error message from peer, we set the socket state to DISCONNECTING.
The socket is notified about this broken connection using EPIPE when
a user tries to send a message. However if a socket was waiting on a
poll() while the connection is being terminated, we fail to wakeup
that socket.
In this commit, we wakeup sleeping sockets at connection termination.
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/socket.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index adf3e6ecf61e..cd01deb1da9c 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -1599,6 +1599,7 @@ static bool filter_connect(struct tipc_sock *tsk, struct sk_buff *skb) /* Let timer expire on it's own */ tipc_node_remove_conn(net, tsk_peer_node(tsk), tsk->portid); + sk->sk_state_change(sk); } return true; |