The interrupt handle references the ibverbs async_fd which is owned
by the ibverbs context, not by this driver. Clear the FD reference
before freeing the interrupt handle to avoid a spurious leak warning.
Fixes: d770ee9caed0 ("interrupts: warn on leaked FDs")
Signed-off-by: David Marchand <[email protected]>
---
drivers/net/mana/mana.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index 30b0ce90d6..0ea6d9a54a 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -1796,6 +1796,8 @@ mana_reset_exit(struct mana_priv *priv)
else
DRV_LOG(DEBUG, "%d intr callback(s) removed", ret);
+ /* fd is owned by ibverbs, only clear reference here. */
+ rte_intr_fd_set(priv->intr_handle, -1);
rte_intr_instance_free(priv->intr_handle);
priv->intr_handle = NULL;
}
@@ -1915,6 +1917,8 @@ mana_intr_uninstall(struct mana_priv *priv)
return ret;
}
+ /* fd is owned by ibverbs, only clear reference here. */
+ rte_intr_fd_set(priv->intr_handle, -1);
rte_intr_instance_free(priv->intr_handle);
priv->intr_handle = NULL;
--
2.54.0