aboutsummaryrefslogtreecommitdiffstats
path: root/net/smc/smc_core.c
diff options
context:
space:
mode:
authorUrsula Braun <ubraun@linux.ibm.com>2019-10-21 16:13:08 +0200
committerJakub Kicinski <jakub.kicinski@netronome.com>2019-10-22 11:23:43 -0700
commitb290098092e4aeaa1712d3326bf5b64d2751c740 (patch)
treea61e1a914084e4c9876d8eb15af342529b036e49 /net/smc/smc_core.c
parentMerge branch 'mlxsw-core-extend-qsfp-eeprom-size' (diff)
downloadlinux-dev-b290098092e4aeaa1712d3326bf5b64d2751c740.tar.xz
linux-dev-b290098092e4aeaa1712d3326bf5b64d2751c740.zip
net/smc: cancel send and receive for terminated socket
The resources for a terminated socket are being cleaned up. This patch makes sure * no more data is received for an actively terminated socket * no more data is sent for an actively or passively terminated socket 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>
Diffstat (limited to 'net/smc/smc_core.c')
-rw-r--r--net/smc/smc_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c
index de9bf035f545..4ee0e33b8c5a 100644
--- a/net/smc/smc_core.c
+++ b/net/smc/smc_core.c
@@ -500,6 +500,7 @@ static void __smc_lgr_terminate(struct smc_link_group *lgr)
conn = rb_entry(node, struct smc_connection, alert_node);
smc = container_of(conn, struct smc_sock, conn);
sock_hold(&smc->sk); /* sock_put in close work */
+ conn->killed = 1;
conn->local_tx_ctrl.conn_state_flags.peer_conn_abort = 1;
__smc_lgr_unregister_conn(conn);
conn->lgr = NULL;