mbox series

[0/1] Avoid race with unregister interrupt hanlder if interrupt

Message ID 20200724090011.17157-1-Renata.Saiakhova@ekinops.com (mailing list archive)
Headers
Series Avoid race with unregister interrupt hanlder if interrupt |

Message

Renata Saiakhova July 24, 2020, 9 a.m. UTC
  For pci_vfio, while removing the device by rte_dev_remove(),
pci_vfio_disable_notifier() will call rte_intr_callback_unregister(),
which may return -EAGAIN, if an interrupt source (kernel) has some active
callbacks right now. As a result, the callback (req notifier) can be never unregistered,
and the corresponding descriptor (vfio_req_intr_handle.fd) can be never closed.
The kernel will continuously try to notify the user space using req notifier, but as
the device is already removed, in this case it even cannot find a bus for that
device, the log is full of messages "EAL: Cannot find bus for device (XX:XX.X)"

Renata Saiakhova (1):
  librte_eal: wrapper around rte_intr_callback_unregister().

 lib/librte_eal/freebsd/eal_interrupts.c | 16 ++++++++++++++--
 lib/librte_eal/linux/eal_interrupts.c   | 16 ++++++++++++++--
 2 files changed, 28 insertions(+), 4 deletions(-)