net/e1000: fix crash on Tx done clean up
authorJeff Guo <jia.guo@intel.com>
Thu, 16 Jul 2020 09:24:38 +0000 (17:24 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Jul 2020 11:54:54 +0000 (13:54 +0200)
commit4237be2b9e250d431d465b81a0abbe5fb559d2c8
tree6ebee20b6b4af380117fb6893a083a774cb36280
parent34c3e885bee397c5e3af35e3f2c463cda83739d2
net/e1000: fix crash on Tx done clean up

As tx mbuf is not set for some advanced descriptors, if there is no
mbuf checking before rte_pktmbuf_free_seg() function be called on
the process of tx done clean up, that will cause a segfault. So add
a NULL pointer check to fix it.

Bugzilla ID: 501
Fixes: 8d907d2b79f7 ("net/igb: free consumed Tx buffers on demand")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
drivers/net/e1000/igb_rxtx.c