linux_dsm_epyc7002/net/smc
Ursula Braun 86434744fe net/smc: add fallback check to connect()
FASTOPEN setsockopt() or sendmsg() may switch the SMC socket to fallback
mode. Once fallback mode is active, the native TCP socket functions are
called. Nevertheless there is a small race window, when FASTOPEN
setsockopt/sendmsg runs in parallel to a connect(), and switch the
socket into fallback mode before connect() takes the sock lock.
Make sure the SMC-specific connect setup is omitted in this case.

This way a syzbot-reported refcount problem is fixed, triggered by
different threads running non-blocking connect() and FASTOPEN_KEY
setsockopt.

Reported-by: syzbot+96d3f9ff6a86d37e44c8@syzkaller.appspotmail.com
Fixes: 6d6dd528d5 ("net/smc: fix refcount non-blocking connect() -part 2")
Signed-off-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>
2019-12-15 11:10:30 -08:00
..
af_smc.c net/smc: add fallback check to connect() 2019-12-15 11:10:30 -08:00
Kconfig
Makefile
smc_cdc.c net/smc: fix final cleanup sequence for SMCD devices 2019-11-15 12:28:28 -08:00
smc_cdc.h
smc_clc.c net/smc: abnormal termination of SMCD link groups 2019-11-15 12:28:28 -08:00
smc_clc.h
smc_close.c net/smc: remove unused constant 2019-11-16 12:26:49 -08:00
smc_close.h net/smc: remove close abort worker 2019-10-22 11:23:44 -07:00
smc_core.c net/smc: guarantee removal of link groups in reboot 2019-11-16 12:26:49 -08:00
smc_core.h net/smc: introduce bookkeeping of SMCR link groups 2019-11-16 12:26:49 -08:00
smc_diag.c
smc_ib.c net/smc: introduce bookkeeping of SMCR link groups 2019-11-16 12:26:49 -08:00
smc_ib.h net/smc: introduce bookkeeping of SMCR link groups 2019-11-16 12:26:49 -08:00
smc_ism.c net/smc: introduce bookkeeping of SMCD link groups 2019-11-15 12:28:28 -08:00
smc_ism.h
smc_llc.c net/smc: immediate termination for SMCR link groups 2019-11-15 12:28:28 -08:00
smc_llc.h
smc_netns.h
smc_pnet.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-09 11:04:37 -08:00
smc_pnet.h
smc_rx.c net/smc: cancel send and receive for terminated socket 2019-10-22 11:23:43 -07:00
smc_rx.h
smc_tx.c net/smc: abnormal termination of SMCD link groups 2019-11-15 12:28:28 -08:00
smc_tx.h
smc_wr.c net/smc: wait for tx completions before link freeing 2019-11-15 12:28:28 -08:00
smc_wr.h net/smc: no WR buffer wait for terminating link group 2019-11-15 12:28:28 -08:00
smc.h net/smc: cancel send and receive for terminated socket 2019-10-22 11:23:43 -07:00