summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2017-06-19 15:41:39 +0000
committeravg <avg@FreeBSD.org>2017-06-19 15:41:39 +0000
commit9f0645de9df40a686a5cb32bf6ff7f66aedb8491 (patch)
tree9da838551f5ae6bcd2592975a41f75acc8ee6355
parent8f9279e5e93f5306eabff936d70854b8a29cbb57 (diff)
downloadFreeBSD-src-9f0645de9df40a686a5cb32bf6ff7f66aedb8491.zip
FreeBSD-src-9f0645de9df40a686a5cb32bf6ff7f66aedb8491.tar.gz
MFC r318867: fix vmxnet3 crash when LRO is enabled
Sponsored by: Panzura
-rw-r--r--sys/dev/vmware/vmxnet3/if_vmx.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/dev/vmware/vmxnet3/if_vmx.c b/sys/dev/vmware/vmxnet3/if_vmx.c
index e58d8e3..fe8063a 100644
--- a/sys/dev/vmware/vmxnet3/if_vmx.c
+++ b/sys/dev/vmware/vmxnet3/if_vmx.c
@@ -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__));
OpenPOWER on IntegriCloud