Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jun 2017 15:41:40 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r320116 - stable/10/sys/dev/vmware/vmxnet3
Message-ID:  <201706191541.v5JFfe1v007112@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Mon Jun 19 15:41:39 2017
New Revision: 320116
URL: https://svnweb.freebsd.org/changeset/base/320116

Log:
  MFC r318867: fix vmxnet3 crash when LRO is enabled
  
  Sponsored by:	Panzura

Modified:
  stable/10/sys/dev/vmware/vmxnet3/if_vmx.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c
==============================================================================
--- stable/10/sys/dev/vmware/vmxnet3/if_vmx.c	Mon Jun 19 15:38:22 2017	(r320115)
+++ stable/10/sys/dev/vmware/vmxnet3/if_vmx.c	Mon Jun 19 15:41:39 2017	(r320116)
@@ -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__));
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706191541.v5JFfe1v007112>