Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-06-10 11:33:10 +0200
committerJiri Slaby <jslaby@suse.cz>2019-06-10 11:33:27 +0200
commit5e220c527c3d48f3fa9583e50b95a85bd7f9f3a3 (patch)
treecf8d57a490024418bf2a650957526c0fea2aa179
parentc69851262ed324e81fdf658b227349fe5acb175e (diff)
tipc: fix hanging clients using poll with EPOLLOUT flag
(git-fixes).
-rw-r--r--patches.suse/tipc-fix-hanging-clients-using-poll-with-EPOLLOUT-fl.patch52
-rw-r--r--series.conf1
2 files changed, 53 insertions, 0 deletions
diff --git a/patches.suse/tipc-fix-hanging-clients-using-poll-with-EPOLLOUT-fl.patch b/patches.suse/tipc-fix-hanging-clients-using-poll-with-EPOLLOUT-fl.patch
new file mode 100644
index 0000000000..aebb493dca
--- /dev/null
+++ b/patches.suse/tipc-fix-hanging-clients-using-poll-with-EPOLLOUT-fl.patch
@@ -0,0 +1,52 @@
+From: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@gmail.com>
+Date: Thu, 9 May 2019 07:13:42 +0200
+Subject: tipc: fix hanging clients using poll with EPOLLOUT flag
+Git-commit: ff946833b70e0c7f93de9a3f5b329b5ae2287b38
+Patch-mainline: v5.2-rc1
+References: git-fixes
+
+commit 517d7c79bdb398 ("tipc: fix hanging poll() for stream sockets")
+introduced a regression for clients using non-blocking sockets.
+After the commit, we send EPOLLOUT event to the client even in
+TIPC_CONNECTING state. This causes the subsequent send() to fail
+with ENOTCONN, as the socket is still not in TIPC_ESTABLISHED state.
+
+In this commit, we:
+- improve the fix for hanging poll() by replacing sk_data_ready()
+ with sk_state_change() to wake up all clients.
+- revert the faulty updates introduced by commit 517d7c79bdb398
+ ("tipc: fix hanging poll() for stream sockets").
+
+Fixes: 517d7c79bdb398 ("tipc: fix hanging poll() for stream sockets")
+Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@gmail.com>
+Acked-by: Jon Maloy <jon.maloy@ericsson.se>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ net/tipc/socket.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/net/tipc/socket.c
++++ b/net/tipc/socket.c
+@@ -711,11 +711,11 @@ static unsigned int tipc_poll(struct fil
+
+ switch (sk->sk_state) {
+ case TIPC_ESTABLISHED:
+- case TIPC_CONNECTING:
+ if (!tsk->cong_link_cnt && !tsk_conn_cong(tsk))
+ mask |= POLLOUT;
+ /* fall thru' */
+ case TIPC_LISTEN:
++ case TIPC_CONNECTING:
+ if (!skb_queue_empty(&sk->sk_receive_queue))
+ mask |= (POLLIN | POLLRDNORM);
+ break;
+@@ -1597,7 +1597,7 @@ static bool filter_connect(struct tipc_s
+ return true;
+
+ /* If empty 'ACK-' message, wake up sleeping connect() */
+- sk->sk_data_ready(sk);
++ sk->sk_state_change(sk);
+
+ /* 'ACK-' message is neither accepted nor rejected: */
+ msg_set_dest_droppable(hdr, 1);
diff --git a/series.conf b/series.conf
index fb5b8aafd4..2445078839 100644
--- a/series.conf
+++ b/series.conf
@@ -22178,6 +22178,7 @@
patches.fixes/RDMA-rxe-Consider-skb-reserve-space-based-on-netdev-.patch
patches.drivers/clk-rockchip-fix-wrong-clock-definitions-for-rk3328.patch
patches.drivers/clk-rockchip-Fix-video-codec-clocks-on-rk3288.patch
+ patches.suse/tipc-fix-hanging-clients-using-poll-with-EPOLLOUT-fl.patch
patches.arch/powerpc-numa-improve-control-of-topology-updates.patch
patches.arch/powerpc-numa-document-topology_updates_enabled-disab.patch
patches.arch/powerpc-pseries-Track-LMB-nid-instead-of-using-devic.patch