Skip to content

Commit 8a53058

Browse files
committed
Merge branch 'smc-fixes'
Ursula Braun says: ==================== net/smc: fixes 2019-06-26 here are 2 small smc fixes for the net tree. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 30d8177 + 8c33bf1 commit 8a53058

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

net/smc/af_smc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2029,7 +2029,7 @@ static int __init smc_init(void)
20292029

20302030
rc = smc_pnet_init();
20312031
if (rc)
2032-
return rc;
2032+
goto out_pernet_subsys;
20332033

20342034
rc = smc_llc_init();
20352035
if (rc) {
@@ -2080,6 +2080,9 @@ static int __init smc_init(void)
20802080
proto_unregister(&smc_proto);
20812081
out_pnet:
20822082
smc_pnet_exit();
2083+
out_pernet_subsys:
2084+
unregister_pernet_subsys(&smc_net_ops);
2085+
20832086
return rc;
20842087
}
20852088

net/smc/smc_core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,10 @@ int smc_conn_create(struct smc_sock *smc, struct smc_init_info *ini)
652652
rc = smc_lgr_create(smc, ini);
653653
if (rc)
654654
goto out;
655+
lgr = conn->lgr;
656+
write_lock_bh(&lgr->conns_lock);
655657
smc_lgr_register_conn(conn); /* add smc conn to lgr */
658+
write_unlock_bh(&lgr->conns_lock);
656659
}
657660
conn->local_tx_ctrl.common.type = SMC_CDC_MSG_TYPE;
658661
conn->local_tx_ctrl.len = SMC_WR_TX_SIZE;

0 commit comments

Comments
 (0)