Commit 8a53058b authored by David S. Miller's avatar David S. Miller

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: default avatarDavid S. Miller <davem@davemloft.net>
parents 30d8177e 8c33bf1b
...@@ -2029,7 +2029,7 @@ static int __init smc_init(void) ...@@ -2029,7 +2029,7 @@ static int __init smc_init(void)
rc = smc_pnet_init(); rc = smc_pnet_init();
if (rc) if (rc)
return rc; goto out_pernet_subsys;
rc = smc_llc_init(); rc = smc_llc_init();
if (rc) { if (rc) {
...@@ -2080,6 +2080,9 @@ static int __init smc_init(void) ...@@ -2080,6 +2080,9 @@ static int __init smc_init(void)
proto_unregister(&smc_proto); proto_unregister(&smc_proto);
out_pnet: out_pnet:
smc_pnet_exit(); smc_pnet_exit();
out_pernet_subsys:
unregister_pernet_subsys(&smc_net_ops);
return rc; return rc;
} }
......
...@@ -652,7 +652,10 @@ int smc_conn_create(struct smc_sock *smc, struct smc_init_info *ini) ...@@ -652,7 +652,10 @@ int smc_conn_create(struct smc_sock *smc, struct smc_init_info *ini)
rc = smc_lgr_create(smc, ini); rc = smc_lgr_create(smc, ini);
if (rc) if (rc)
goto out; goto out;
lgr = conn->lgr;
write_lock_bh(&lgr->conns_lock);
smc_lgr_register_conn(conn); /* add smc conn to lgr */ smc_lgr_register_conn(conn); /* add smc conn to lgr */
write_unlock_bh(&lgr->conns_lock);
} }
conn->local_tx_ctrl.common.type = SMC_CDC_MSG_TYPE; conn->local_tx_ctrl.common.type = SMC_CDC_MSG_TYPE;
conn->local_tx_ctrl.len = SMC_WR_TX_SIZE; conn->local_tx_ctrl.len = SMC_WR_TX_SIZE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment