OSDN Git Service

net/smc: improve abnormal termination locking
authorUrsula Braun <ubraun@linux.ibm.com>
Mon, 21 Oct 2019 14:13:10 +0000 (16:13 +0200)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 22 Oct 2019 18:23:43 +0000 (11:23 -0700)
commit69318b5215f2dc32c345a3d65b98b4b1bf29c007
treeee0edeb43b49e4f4bea1183a0561d7dee95f4b39
parent8caa654451bda40379bff786a63833b2965536e4
net/smc: improve abnormal termination locking

Locking hierarchy requires that the link group conns_lock can be
taken if the socket lock is held, but not vice versa. Nevertheless
socket termination during abnormal link group termination should
be protected by the socket lock.
This patch reduces the time segments the link group conns_lock is
held to enable usage of lock_sock in smc_lgr_terminate().

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>
net/smc/smc_core.c