linux-stable/net/smc
Tony Lu a792b3d564 net/smc: Keep smc_close_final rc during active close
commit 00e158fb91 upstream.

When smc_close_final() returns error, the return code overwrites by
kernel_sock_shutdown() in smc_close_active(). The return code of
smc_close_final() is more important than kernel_sock_shutdown(), and it
will pass to userspace directly.

Fix it by keeping both return codes, if smc_close_final() raises an
error, return it or kernel_sock_shutdown()'s.

Link: https://lore.kernel.org/linux-s390/1f67548e-cbf6-0dce-82b5-10288a4583bd@linux.ibm.com/
Fixes: 606a63c978 ("net/smc: Ensure the active closing peer first closes clcsock")
Suggested-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
Reviewed-by: Wen Gu <guwen@linux.alibaba.com>
Acked-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-08 09:03:26 +01:00
..
af_smc.c net/smc: Avoid warning of possible recursive locking 2021-12-08 09:03:20 +01:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
smc.h net/smc: introduce CLC first contact extension 2020-09-28 15:19:03 -07:00
smc_cdc.c net/smc: use separate work queues for different worker types 2020-09-10 15:24:27 -07:00
smc_cdc.h net/smc: pre-fetch send buffer outside of send_lock 2020-05-30 18:12:25 -07:00
smc_clc.c net/smc: add missing error check in smc_clc_prfx_set() 2021-09-30 10:11:02 +02:00
smc_clc.h net/smc: Replace zero-length array with flexible-array member 2020-10-30 16:57:42 -05:00
smc_close.c net/smc: Keep smc_close_final rc during active close 2021-12-08 09:03:26 +01:00
smc_close.h net/smc: remove close abort worker 2019-10-22 11:23:44 -07:00
smc_core.c net/smc: fix wrong list_del in smc_lgr_cleanup_early 2021-12-08 09:03:26 +01:00
smc_core.h net/smc: fix wait on already cleared link 2021-08-18 08:59:10 +02:00
smc_diag.c net/smc: use the retry mechanism for netlink messages 2020-09-10 15:24:27 -07:00
smc_ib.c net/smc: fix direct access to ib_gid_addr->ndev in smc_ib_determine_gid() 2020-11-19 10:59:19 -08:00
smc_ib.h net/smc: protect smc ib device initialization 2020-07-19 15:30:22 -07:00
smc_ism.c net/smc: remove device from smcd_dev_list after failed device_add() 2021-06-03 09:00:48 +02:00
smc_ism.h net/smc: introduce CHID callback for ISM devices 2020-09-28 15:19:03 -07:00
smc_llc.c net/smc: Fix smc_link->llc_testlink_time overflow 2021-11-18 14:03:44 +01:00
smc_llc.h net/smc: move add link processing for new device into llc layer 2020-07-19 15:30:22 -07:00
smc_netns.h net/smc: introduce list of pnetids for Ethernet devices 2020-09-28 15:19:03 -07:00
smc_pnet.c net/smc: determine proposed ISM devices 2020-09-28 15:19:03 -07:00
smc_pnet.h net/smc: determine proposed ISM devices 2020-09-28 15:19:03 -07:00
smc_rx.c fs: make the pipe_buf_operations ->confirm operation optional 2020-05-20 12:11:26 -04:00
smc_rx.h
smc_tx.c net/smc: fix wait on already cleared link 2021-08-18 08:59:10 +02:00
smc_tx.h
smc_wr.c net/smc: fix wait on already cleared link 2021-08-18 08:59:10 +02:00
smc_wr.h net/smc: wait for departure of an IB message 2020-05-04 10:54:39 -07:00