diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index c5f98c6b2561..e7ec066b0d6a 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -294,6 +294,8 @@ static int __smc_release(struct smc_sock *smc) sk->sk_prot->unhash(sk); + barrier(); + if (sk->sk_state == SMC_CLOSED) { if (smc->clcsock) { release_sock(sk);