]> git.droids-corp.org - dpdk.git/commit
net/tap: fix interrupt handler freeing
authorQuentin Armitage <quentin@armitage.org.uk>
Tue, 3 May 2022 15:27:32 +0000 (16:27 +0100)
committerAndrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Thu, 12 May 2022 08:11:16 +0000 (10:11 +0200)
commit0809d870fc22916627ec5e177d4c138c12196321
tree1f4b99f416f5a6ccc19d8325115fb1595420286d
parent1c5c6cd85f8cab2af92d265b6c7671df0b82e6fb
net/tap: fix interrupt handler freeing

rte_pmd_tun/tap_probe() allocates pmd->intr_handle in eth_dev_tap_create()
and it should not be freed until rte_pmd_tap_remove() is called.

Inspection of tap_rx_intr_vec_set() shows that the call to
tap_tx_intr_vec_uninstall() was calling rte_intr_instance_free() but
tap_tx_intr_vec_install() can then be immediately called, and this then
uses pmd->intr_handle without it being reallocated.

Move rte_intr_instance_free() call from tap_tx_intr_vec_uninstall()
to rte_pmd_tap_remove().

Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")
Cc: stable@dpdk.org
Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
Reviewed-by: David Marchand <david.marchand@redhat.com>
drivers/net/tap/rte_eth_tap.c
drivers/net/tap/tap_intr.c