linux/net/smc
Ursula Braun 90e0e78bfa net/smc: add fallback check to connect()
commit 86434744fe upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-04 19:18:37 +01:00
..
Kconfig
Makefile
af_smc.c net/smc: add fallback check to connect() 2020-01-04 19:18:37 +01:00
smc.h
smc_cdc.c
smc_cdc.h
smc_clc.c
smc_clc.h
smc_close.c
smc_close.h
smc_core.c net/smc: increase device refcount for added link group 2019-12-31 16:43:53 +01:00
smc_core.h
smc_diag.c
smc_ib.c
smc_ib.h
smc_ism.c
smc_ism.h
smc_llc.c
smc_llc.h
smc_netns.h
smc_pnet.c net/smc: fix ethernet interface refcounting 2019-11-06 17:44:32 -08:00
smc_pnet.h
smc_rx.c net/smc: receive pending data after RCV_SHUTDOWN 2019-10-10 19:08:41 -07:00
smc_rx.h
smc_tx.c net/smc: make sure EPOLLOUT is raised 2019-08-20 12:25:14 -07:00
smc_tx.h
smc_wr.c
smc_wr.h