fix vmxnet3 crash when LRO is enabled
The crash can occur when all of the following conditions are true: - a packet consists of multiple segements (requires LRO enabled) - there has been a failure to allocate an mbuf for the packet and the packet has to be dropped - a host (vmware) still owned at least one segment of the packet, so the driver had to wait for another interrupt to proceed to discarding the remaning segment(s) Reviewed by: rstone MFC after: 2 weeks Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D10874
This commit is contained in:
parent
f539305e42
commit
ced98d784b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=318867
@ -2194,6 +2194,20 @@ vmxnet3_rxq_eof(struct vmxnet3_rxqueue *rxq)
|
||||
} else {
|
||||
KASSERT(rxd->btype == VMXNET3_BTYPE_BODY,
|
||||
("%s: non start of frame w/o body buffer", __func__));
|
||||
|
||||
if (m_head == NULL && m_tail == NULL) {
|
||||
/*
|
||||
* This is a continuation of a packet that we
|
||||
* started to drop, but could not drop entirely
|
||||
* because this segment was still owned by the
|
||||
* host. So, drop the remainder now.
|
||||
*/
|
||||
vmxnet3_rxq_eof_discard(rxq, rxr, idx);
|
||||
if (!rxcd->eop)
|
||||
vmxnet3_rxq_discard_chain(rxq);
|
||||
goto nextp;
|
||||
}
|
||||
|
||||
KASSERT(m_head != NULL,
|
||||
("%s: frame not started?", __func__));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user