On Tue, May 13, 2025 at 11:52 AM Mingjin Ye <mingjinx...@intel.com> wrote:
>
> This patch reverts commit f5b2eff0847d ("bus/vdev: fix devargs after
> multi-process bus scan")
>
> With current code, we do not add devargs to devargs list when we add a
> vdev in secondary process (because `init` flag is set to `false`).
>
> Because of this, when we do vdev_uninit, we call rte_devargs_remove on
> the &devargs pointer (the one we didn't add to devargs list but did save
> inside rte_vdev_device struct), but in secondary process, because
> devargs were not added to the list in the first place, devargs_remove
> does not find the associated devargs in its list and therefore does not
> free associated resources. As a result, we get a memory leak, because we
> free the rte_vdev_device but not its associated devargs.
>
> Revert this patch to avoid leaking devargs on vdev uninit.
>
> Fixes: f5b2eff0847d ("bus/vdev: fix devargs after multi-process bus scan")
> Cc: sta...@dpdk.org
>
> Signed-off-by: Mingjin Ye <mingjinx...@intel.com>

I see back and forth on this topic but this still seems strange we
would have to revert such an old commit.

Please add a unit test showing the bug.


-- 
David Marchand

Reply via email to