]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix hanging poll() for stream sockets
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@gmail.com>
Thu, 28 Dec 2017 11:03:06 +0000 (12:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Dec 2017 17:15:26 +0000 (12:15 -0500)
commit0fe29b7f0abed85cfd1ad9f2ebdecbed8a72abdc
treef850757a09157847c5d04364b7d19df3c7ac7762
parentc0ab9f3e48b7014cdc6ed8bf185733ccb5c10d2c
tipc: fix hanging poll() for stream sockets

In commit f4cbb05dfdb011 ("tipc: Fix missing connection request
handling"), we replaced unconditional wakeup() with condtional
wakeup for clients with flags POLLIN | POLLRDNORM | POLLRDBAND.

This breaks the applications which do a connect followed by poll
with POLLOUT flag. These applications are not woken when the
connection is ESTABLISHED and hence sleep forever.

In this commit, we fix it by including the POLLOUT event for
sockets in TIPC_CONNECTING state.

Fixes: f4cbb05dfdb011 ("tipc: Fix missing connection request handling")
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c