android_kernel_asus_sm8350/net/smc
D. Wythe 1a517302db net/smc: fix fallback failed while sendmsg with fastopen
[ Upstream commit ce7ca794712f186da99719e8b4e97bd5ddbb04c3 ]

Before determining whether the msg has unsupported options, it has been
prematurely terminated by the wrong status check.

For the application, the general usages of MSG_FASTOPEN likes

fd = socket(...)
/* rather than connect */
sendto(fd, data, len, MSG_FASTOPEN)

Hence, We need to check the flag before state check, because the sock
state here is always SMC_INIT when applications tries MSG_FASTOPEN.
Once we found unsupported options, fallback it to TCP.

Fixes: ee9dfbef02 ("net/smc: handle sockopts forcing fallback")
Signed-off-by: D. Wythe <alibuda@linux.alibaba.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>

v2 -> v1: Optimize code style
Reviewed-by: Tony Lu <tonylu@linux.alibaba.com>

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-17 08:32:51 +01:00
..
af_smc.c net/smc: fix fallback failed while sendmsg with fastopen 2023-03-17 08:32:51 +01:00
Kconfig
Makefile
smc_cdc.c
smc_cdc.h
smc_clc.c net/smc: add missing error check in smc_clc_prfx_set() 2021-09-30 10:09:23 +02:00
smc_clc.h
smc_close.c net/smc: Keep smc_close_final rc during active close 2021-12-08 09:01:13 +01:00
smc_close.h
smc_core.c net/smc: correct settings of RMB window update limit 2022-04-15 14:18:34 +02:00
smc_core.h
smc_diag.c net/smc: Prevent kernel-infoleak in __smc_diag_dump() 2020-09-03 11:26:40 +02:00
smc_ib.c net/smc: fix direct access to ib_gid_addr->ndev in smc_ib_determine_gid() 2020-11-24 13:28:58 +01:00
smc_ib.h
smc_ism.c Revert "net/smc: fix a NULL pointer dereference" 2021-06-03 08:59:08 +02:00
smc_ism.h
smc_llc.c
smc_llc.h
smc_netns.h
smc_pnet.c net/smc: Fix NULL pointer dereference in smc_pnet_find_ib() 2022-04-20 09:19:35 +02:00
smc_pnet.h
smc_rx.c net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending 2022-05-18 09:47:25 +02:00
smc_rx.h
smc_tx.c
smc_tx.h
smc_wr.c
smc_wr.h
smc.h