From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BEF08A034C; Mon, 14 Nov 2022 10:55:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5A16640150; Mon, 14 Nov 2022 10:55:22 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id E1A694014F for ; Mon, 14 Nov 2022 10:55:20 +0100 (CET) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH] mempool: fix rte_mempool_avail_count may segment fault when used in multiprocess Date: Mon, 14 Nov 2022 10:55:18 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D874B9@smartserver.smartshare.dk> In-Reply-To: <20221114071439.38902-1-changfengnan@bytedance.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] mempool: fix rte_mempool_avail_count may segment fault when used in multiprocess Thread-Index: Adj4AQQGcXDrvxHBS6WVThytk+KQ/QADXeBg References: <20221114071439.38902-1-changfengnan@bytedance.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "changfengnan" , , , X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: changfengnan [mailto:changfengnan@bytedance.com] > Sent: Monday, 14 November 2022 08.15 >=20 > 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. >=20 > Signed-off-by: changfengnan > --- 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-bod= y With a proper sign-off line, Acked-by: Morten Br=F8rup