net/vmxnet3: handle bad host framing
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 12 May 2020 20:40:03 +0000 (13:40 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 18 May 2020 18:35:57 +0000 (20:35 +0200)
commiteb49f1671f30ede5121373e633c529b75993a6b2
tree3232c696f44364a2e3bed2a6c9f681bd82798b46
parent69faa84160213076e5f707ec97b3c57a3b0cc11f
net/vmxnet3: handle bad host framing

The VMXNet3 protocol has a start-of-packet (SOP) and end-of-packet (EOP)
marker. If there was a bug where mbuf arrived without SOP the code that
chains the mbuf would dereference a null pointer.
Also, record any mbuf's dropped in statistics.

Although did the initial code no longer have access to VMware.
Compile tested only!

Coverity issue: 124563
Fixes: 8ee787ce80a8 ("vmxnet3: remove asserts that confuse coverity")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
drivers/net/vmxnet3/vmxnet3_rxtx.c