Don't try to adjust a TLS TOE socket that has been closed.

The handshake timer can race with another thread sending a FIN or RST
to close a TOE TLS socket.  Just bail from the timer without
rescheduling if the connection is closed when the timer fires.

Reported by:	Sony Arpita Das @ Chelsio QA
Reviewed by:	np
Differential Revision:	https://reviews.freebsd.org/D27583
This commit is contained in:
John Baldwin 2020-12-09 14:36:01 -08:00
parent b67e440755
commit 6727847500

View File

@ -739,6 +739,10 @@ tls_send_handshake_ack(void *arg)
struct tls_ofld_info *tls_ofld = &toep->tls;
struct adapter *sc = td_adapter(toep->td);
/* Bail without rescheduling if the connection has closed. */
if ((toep->flags & (TPF_FIN_SENT | TPF_ABORT_SHUTDOWN)) != 0)
return;
/*
* If this connection has timed out without receiving more
* data, downgrade to plain TOE mode and don't re-arm the