]> git.droids-corp.org - dpdk.git/commit
eventdev/eth_tx: fix queue delete logic
authorNaga Harish K S V <s.v.naga.harish.k@intel.com>
Tue, 9 Nov 2021 07:33:33 +0000 (01:33 -0600)
committerJerin Jacob <jerinj@marvell.com>
Mon, 15 Nov 2021 07:22:38 +0000 (08:22 +0100)
commit741b499e6421ff93542d17c57f536b9d8e9bb443
treeb0c9500e5b9acf0c8eb81fa4b0d2d508d40e7700
parent130e99db590073dd58da7e5c32dec8c2181527dd
eventdev/eth_tx: fix queue delete logic

This patch fixes heap-use-after-free reported by ASan.

The application can use the queue_id as `-1` to delete all
the queues of the eth_device that are added to tx_adapter
instance.
In above case, the queue_del API is trying to use number of
queues from adapter level instead of eth_device queues.
When there are queues added from multiple eth devices,
it will result in heap-use-after-free as reported by ASAN.

This patch fixes the queue_del API to use correct number of
queues.

Bugzilla ID: 869
Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")
Cc: stable@dpdk.org
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Tested-by: David Marchand <david.marchand@redhat.com>
lib/eventdev/rte_event_eth_tx_adapter.c