net/smc: abort CLC connection in smc_release
[sfrench/cifs-2.6.git] / net / smc / af_smc.c
index 80e2119f1c7010ead3c493c60c511c125d6c7149..84f67f601838e019244e83268bfc3a2a92da618d 100644 (file)
@@ -127,6 +127,8 @@ static int smc_release(struct socket *sock)
        smc = smc_sk(sk);
 
        /* cleanup for a dangling non-blocking connect */
+       if (smc->connect_info && sk->sk_state == SMC_INIT)
+               tcp_abort(smc->clcsock->sk, ECONNABORTED);
        flush_work(&smc->connect_work);
        kfree(smc->connect_info);
        smc->connect_info = NULL;