linux-stable/net/smc
liuyacan 60546c0b4b net/smc: postpone sk_refcnt increment in connect()
[ Upstream commit 75c1edf23b ]

Same trigger condition as commit 86434744. When setsockopt runs
in parallel to a connect(), and switch the socket into fallback
mode. Then the sk_refcnt is incremented in smc_connect(), but
its state stay in SMC_INIT (NOT SMC_ACTIVE). This cause the
corresponding sk_refcnt decrement in __smc_release() will not be
performed.

Fixes: 86434744fe ("net/smc: add fallback check to connect()")
Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:11:39 +02:00
..
af_smc.c net/smc: postpone sk_refcnt increment in connect() 2022-06-14 18:11:39 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
smc.h net/smc: nonblocking connect rework 2019-04-12 10:50:56 -07:00
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 net/smc: improve smc_conn_create reason codes 2019-04-12 10:50:56 -07:00
smc_close.c net/smc: Keep smc_close_final rc during active close 2021-12-08 09:01:13 +01:00
smc_close.h net/smc: wait for pending work before clcsock release_sock 2019-04-11 11:04:08 -07:00
smc_core.c net/smc: correct settings of RMB window update limit 2022-04-15 14:18:34 +02:00
smc_core.h net/smc: improve smc_conn_create reason codes 2019-04-12 10:50:56 -07:00
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 net/smc: consolidate function parameters 2019-04-12 10:50:56 -07:00
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 net/smc: make sure EPOLLOUT is raised 2019-08-20 12:25:14 -07:00
smc_tx.h
smc_wr.c
smc_wr.h