DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: changfengnan <changfengnan@bytedance.com>
Cc: olivier.matz@6wind.com, andrew.rybchenko@oktetlabs.ru,
	dev@dpdk.org, "Morten Brørup" <mb@smartsharesystems.com>
Subject: Re: [PATCH] mempool: fix rte_mempool_avail_count may segment fault when used in multiprocess
Date: Mon, 14 Nov 2022 21:43:50 +0100	[thread overview]
Message-ID: <CAJFAV8yvgM=dsO8zeCHAHJ7XBd_4j_GRfp3jWS0x86H8c9==rQ@mail.gmail.com> (raw)
In-Reply-To: <20221114071439.38902-1-changfengnan@bytedance.com>

On Mon, Nov 14, 2022 at 9:13 AM changfengnan <changfengnan@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@bytedance.com>

Please use your real name.


-- 
David Marchand


  parent reply	other threads:[~2022-11-14 20:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-14  7:14 changfengnan
2022-11-14  9:55 ` Morten Brørup
2022-11-14 11:23 ` changfengnan
2022-11-14 20:43 ` David Marchand [this message]
2022-11-15  1:51   ` [External] " Fengnan Chang
2022-11-15  7:23     ` Morten Brørup
2022-11-15  7:47     ` David Marchand
2022-11-15  8:29       ` Olivier Matz
2022-11-15 11:30         ` Fengnan Chang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJFAV8yvgM=dsO8zeCHAHJ7XBd_4j_GRfp3jWS0x86H8c9==rQ@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=changfengnan@bytedance.com \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.com \
    --cc=olivier.matz@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).