diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 303c5e56e4df..68cd110722a4 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -2538,8 +2538,10 @@ static int smc_shutdown(struct socket *sock, int how) if (smc->use_fallback) { rc = kernel_sock_shutdown(smc->clcsock, how); sk->sk_shutdown = smc->clcsock->sk->sk_shutdown; - if (sk->sk_shutdown == SHUTDOWN_MASK) + if (sk->sk_shutdown == SHUTDOWN_MASK) { sk->sk_state = SMC_CLOSED; + sock_put(sk); + } goto out; } switch (how) {