diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index 8f3c1fced33477d185386d4155d81944a7ec1bff..9b92b52952dd4471c9c6dabf667320a833b2721f 100644 --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -629,7 +629,7 @@ void smc_lgr_terminate(struct smc_link_group *lgr, bool soft) smc_lgr_list_head(lgr, &lgr_lock); spin_lock_bh(lgr_lock); - if (lgr->terminating) { + if (list_empty(&lgr->list) || lgr->terminating || lgr->freeing) { spin_unlock_bh(lgr_lock); return; /* lgr already terminating */ }