kernel_optimize_test/net/tipc
Xin Long 0a178a0151 tipc: call tipc_wait_for_connect only when dlen is not 0
commit 7387a72c5f84f0dfb57618f9e4770672c0d2e4c9 upstream.

__tipc_sendmsg() is called to send SYN packet by either tipc_sendmsg()
or tipc_connect(). The difference is in tipc_connect(), it will call
tipc_wait_for_connect() after __tipc_sendmsg() to wait until connecting
is done. So there's no need to wait in __tipc_sendmsg() for this case.

This patch is to fix it by calling tipc_wait_for_connect() only when dlen
is not 0 in __tipc_sendmsg(), which means it's called by tipc_connect().

Note this also fixes the failure in tipcutils/test/ptts/:

  # ./tipcTS &
  # ./tipcTC 9
  (hang)

Fixes: 36239dab6da7 ("tipc: fix implicit-connect for SYN+")
Reported-by: Shuang Li <shuali@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-03 10:09:28 +02:00
..
addr.c
addr.h
bcast.c net: tipc: fix FB_MTU eat two pages 2021-07-14 16:56:32 +02:00
bcast.h
bearer.c tipc: fix unique bearer names sanity check 2021-06-10 13:39:22 +02:00
bearer.h
core.c tipc: wait and exit until all work queues are done 2021-06-03 09:00:37 +02:00
core.h tipc: wait and exit until all work queues are done 2021-06-03 09:00:37 +02:00
crypto.c tipc: do not write skb_shinfo frags when doing decrytion 2021-08-04 12:46:43 +02:00
crypto.h
diag.c
discover.c
discover.h
eth_media.c
group.c
group.h
ib_media.c
Kconfig
link.c
link.h
Makefile
monitor.c
monitor.h
msg.c net: tipc: fix FB_MTU eat two pages 2021-07-14 16:56:32 +02:00
msg.h net: tipc: fix FB_MTU eat two pages 2021-07-14 16:56:32 +02:00
name_distr.c
name_distr.h
name_table.c
name_table.h
net.c
net.h
netlink_compat.c tipc: convert dest node's address to network order 2021-05-19 10:12:52 +02:00
netlink.c
netlink.h
node.c tipc: better validate user input in tipc_nl_retrieve_key() 2021-03-30 14:31:59 +02:00
node.h
socket.c tipc: call tipc_wait_for_connect only when dlen is not 0 2021-09-03 10:09:28 +02:00
socket.h
subscr.c
subscr.h
sysctl.c
topsrv.c
topsrv.h
trace.c
trace.h
udp_media.c tipc: wait and exit until all work queues are done 2021-06-03 09:00:37 +02:00
udp_media.h