net/softnic: fix memory illegal access after free
authorJasvinder Singh <jasvinder.singh@intel.com>
Fri, 20 Jul 2018 11:05:36 +0000 (12:05 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 23 Jul 2018 21:55:26 +0000 (23:55 +0200)
commit3edc242d459b57aed3c63311f17a9138bec4b4cb
tree91f8902ba2a4978b0be0eb660eef08f6c4fb5485
parent1620175b400e2247cd69240c1e3cbcc5c1889dbe
net/softnic: fix memory illegal access after free

While deleting the elements from the linked list, TAILQ_FOREACH causes
read from the freed pointer. Fixes the issue by using TAILQ_FOREACH_SAFE
instead.

Coverity issue: 302867
Fixes: bef50bcb1c47 ("net/softnic: implement start and stop")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
drivers/net/softnic/rte_eth_softnic_swq.c