On Tue, Nov 9, 2021 at 10:24 AM Jayatheerthan, Jay <jay.jayatheert...@intel.com> wrote: > > -----Original Message----- > > From: Naga Harish K, S V <s.v.naga.haris...@intel.com> > > Sent: Tuesday, November 9, 2021 1:04 PM > > To: jer...@marvell.com; Jayatheerthan, Jay <jay.jayatheert...@intel.com> > > Cc: dev@dpdk.org; sta...@dpdk.org > > Subject: [PATCH] eventdev/eth_tx: fix queue_del function > > > > This patch fixes heap-use-after-free reported by ASAN, > > please reference https://bugs.dpdk.org/show_bug.cgi?id=869 > > > > 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: sta...@dpdk.org > > > > Signed-off-by: Naga Harish K S V <s.v.naga.haris...@intel.com>
RTE>>event_eth_tx_adapter_autotest + ------------------------------------------------------- + + Test Suite : tx event eth adapter test suite Port 0 MAC: 00 00 00 00 00 00 Port 1 MAC: 00 00 00 00 00 00 Failed to find a valid event device, testing with event_sw0 device + ------------------------------------------------------- + + TestCase [ 0] : tx_adapter_create_free succeeded Invalid port_id=2 EVENTDEV: txa_service_adapter_free() line 743: 1 Tx queues not deleted + TestCase [ 1] : tx_adapter_queue_add_del succeeded + TestCase [ 2] : tx_adapter_start_stop succeeded + TestCase [ 3] : tx_adapter_service succeeded + TestCase [ 4] : tx_adapter_dynamic_device succeeded + ------------------------------------------------------- + + Test Suite Summary : tx event eth adapter test suite + ------------------------------------------------------- + + Tests Total : 5 + Tests Skipped : 0 + Tests Executed : 5 + Tests Unsupported: 0 + Tests Passed : 5 + Tests Failed : 0 + ------------------------------------------------------- + Test OK And no ASan splat. Tested-by: David Marchand <david.march...@redhat.com> Thanks. -- David Marchand