net/af_packet: fix fd use after free
authorTimmons C. Player <timmons.player@spirent.com>
Thu, 5 Jan 2017 14:33:35 +0000 (09:33 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Jan 2017 18:41:42 +0000 (19:41 +0100)
commit5d16a43c40cf2220c1b295307a00cee55d845633
treec2f3b0b57bc8576219150def6f01b694a8952387
parent1f4a84672ecbd28bfaaa77f99b6e5b9b77896415
net/af_packet: fix fd use after free

When using the same file descriptor for both rx and tx, the
eth_dev_stop function would close the same fd twice.   This
change prevents that from happening.

Fixes: 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices")

Signed-off-by: Timmons C. Player <timmons.player@spirent.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/af_packet/rte_eth_af_packet.c