cxgbe tom: Free pending iSCSI mbufs on connection shutdown.

If an iSCSI connection is shutdown abruptly (e.g. by a RST from the
peer), pending iSCSI PDUs and page pod work requests can be in the
ulp_pduq when the final CPL is received indicating the death of the
connection.

Reported by:	Jithesh Arakkan @ Chelsio
This commit is contained in:
John Baldwin 2021-05-20 17:16:23 -07:00
parent f949967c8e
commit 677cb9722a

View file

@ -1024,6 +1024,7 @@ final_cpl_received(struct toepcb *toep)
tls_detach(toep);
toep->inp = NULL;
toep->flags &= ~TPF_CPL_PENDING;
mbufq_drain(&toep->ulp_pduq);
mbufq_drain(&toep->ulp_pdu_reclaimq);
if (!(toep->flags & TPF_ATTACHED))