net/smc: immediate freeing in smc_lgr_cleanup_early()
authorUrsula Braun <ubraun@linux.ibm.com>
Thu, 10 Sep 2020 16:48:26 +0000 (18:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Sep 2020 22:24:26 +0000 (15:24 -0700)
commitf9aab6f2ce5761374daa7a65b006bebe04b5591f
treef87c20b5de29a3f57837942d557cb935d72b40e2
parent0c881ada3d1e7f5fd3d9099efca941ef0c6da363
net/smc: immediate freeing in smc_lgr_cleanup_early()

smc_lgr_cleanup_early() schedules the free worker with delay. DMB
unregistering occurs in this delayed worker increasing the risk
to reach the SMCD SBA limit without need. Terminate the
linkgroup immediately, since termination means early DMB unregistering.

For SMCD the global smc_server_lgr_pending lock is given up early.
A linkgroup to be given up with smc_lgr_cleanup_early() may already
contain more than one connection. Using __smc_lgr_terminate() in
smc_lgr_cleanup_early() covers this.

And consolidate smc_ism_put_vlan() and smc_put_device() into smc_lgr_free()
only.

Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_core.c
net/smc/smc_core.h