Skip to content

Commit

Permalink
Merge branch 'smc-fixes'
Browse files Browse the repository at this point in the history
Karsten Graul says:

====================
net/smc: fixes for -net

Fixes for the net tree, covering a memleak when closing
SMC fallback sockets and fix SMC-R connection establishment
when vlan-ids are used.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Oct 26, 2019
2 parents 91e2e57 + ca5f8d2 commit 31af505
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion net/smc/af_smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ struct proto smc_proto6 = {
};
EXPORT_SYMBOL_GPL(smc_proto6);

static void smc_restore_fallback_changes(struct smc_sock *smc)
{
smc->clcsock->file->private_data = smc->sk.sk_socket;
smc->clcsock->file = NULL;
}

static int __smc_release(struct smc_sock *smc)
{
struct sock *sk = &smc->sk;
Expand All @@ -141,6 +147,7 @@ static int __smc_release(struct smc_sock *smc)
}
sk->sk_state = SMC_CLOSED;
sk->sk_state_change(sk);
smc_restore_fallback_changes(smc);
}

sk->sk_prot->unhash(sk);
Expand Down Expand Up @@ -1291,8 +1298,8 @@ static void smc_listen_work(struct work_struct *work)
/* check if RDMA is available */
if (!ism_supported) { /* SMC_TYPE_R or SMC_TYPE_B */
/* prepare RDMA check */
memset(&ini, 0, sizeof(ini));
ini.is_smcd = false;
ini.ism_dev = NULL;
ini.ib_lcl = &pclc->lcl;
rc = smc_find_rdma_device(new_smc, &ini);
if (rc) {
Expand Down

0 comments on commit 31af505

Please sign in to comment.