[PATCH] mempool: fix rte_mempool_avail_count may segment fault when used in multiprocess
Morten Brørup
mb at smartsharesystems.com
Mon Nov 14 10:55:18 CET 2022
> From: changfengnan [mailto:changfengnan at bytedance.com]
> Sent: Monday, 14 November 2022 08.15
>
> 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.
> Fix this by put tailq entry into rte_mempool_tailq after populate.
>
> Signed-off-by: changfengnan <changfengnan at bytedance.com>
> ---
Good catch.
You must use your real name (not your username) before the email address in the sign-off line, or the patch cannot be accepted. Please refer to: https://doc.dpdk.org/guides/contributing/patches.html#commit-messages-body
With a proper sign-off line,
Acked-by: Morten Brørup <mb at smartsharesystems.com>
More information about the dev
mailing list