[PATCH] mempool: fix rte_mempool_avail_count may segment fault when used in multiprocess
David Marchand
david.marchand at redhat.com
Mon Nov 14 21:43:50 CET 2022
On Mon, Nov 14, 2022 at 9:13 AM changfengnan <changfengnan at bytedance.com> wrote:
>
> rte_mempool_create put tailq entry into rte_mempool_tailq list before
> populate, and pool_data set when populate. So in multi process, if
> process A create mempool, and process B can get mempool through
> rte_mempool_lookup before pool_data set, if B call rte_mempool_lookup,
> it will cause segment fault.
I fail to see how pool_data impacts rte_mempool_lookup.
Something is fishy about this commitlog.
> Fix this by put tailq entry into rte_mempool_tailq after populate.
Moving tailq manipulation to rte_mempool_create only, is probably incorrect.
An application is allowed to call rte_mempool_create_empty() and
rte_mempool_populate().
I did not look in depth, but It is likely the reason why testpmd (as
run with devtools/test-null.sh) won't pass anymore.
The CI reported this issue in various envs.
We can't take this patch.
>
> Signed-off-by: changfengnan <changfengnan at bytedance.com>
Please use your real name.
--
David Marchand
More information about the dev
mailing list