android_kernel_motorola_sm6225/net/smc
Karsten Graul ea438df46e net/smc: receive pending data after RCV_SHUTDOWN
[ Upstream commit 107529e31a87acd475ff6a0f82745821b8f70fec ]

smc_rx_recvmsg() first checks if data is available, and then if
RCV_SHUTDOWN is set. There is a race when smc_cdc_msg_recv_action() runs
in between these 2 checks, receives data and sets RCV_SHUTDOWN.
In that case smc_rx_recvmsg() would return from receive without to
process the available data.
Fix that with a final check for data available if RCV_SHUTDOWN is set.
Move the check for data into a function and call it twice.
And use the existing helper smc_rx_data_available().

Fixes: 952310ccf2 ("smc: receive data from RMBE")
Reviewed-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:51:18 +01:00
..
af_smc.c net/smc: do not schedule tx_work in SMC_CLOSED state 2019-08-09 17:52:32 +02:00
Kconfig
Makefile
smc.h net/smc: fix smc_poll in SMC_INIT state 2019-03-19 13:12:41 +01:00
smc_cdc.c net/smc: fix byte_order for rx_curs_confirmed 2019-12-05 09:21:09 +01:00
smc_cdc.h net/smc: fix byte_order for rx_curs_confirmed 2019-12-05 09:21:09 +01:00
smc_clc.c
smc_clc.h
smc_close.c
smc_close.h
smc_core.c net/smc: prevent races between smc_lgr_terminate() and smc_conn_free() 2019-12-05 09:21:08 +01:00
smc_core.h
smc_diag.c net/smc: original socket family in inet_sock_diag 2020-01-27 14:50:20 +01:00
smc_ib.c
smc_ib.h
smc_ism.c
smc_ism.h
smc_llc.c
smc_llc.h
smc_pnet.c
smc_pnet.h
smc_rx.c net/smc: receive pending data after RCV_SHUTDOWN 2020-01-27 14:51:18 +01:00
smc_rx.h
smc_tx.c net/smc: do not wait under send_lock 2019-12-17 20:35:33 +01:00
smc_tx.h
smc_wr.c net/smc: use after free fix in smc_wr_tx_put_slot() 2019-12-13 08:51:34 +01:00
smc_wr.h