From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] mempool: fix corruption due to invalid handler Date: Fri, 16 Sep 2016 16:19:38 +0200 Message-ID: <43354735.jbAHAiVkRh@xps13> References: <1473348597-11904-1-git-send-email-droidluo@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, stable@dpdk.org, olivier.matz@6wind.com To: Weiliang Luo Return-path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 9D9656CC8 for ; Fri, 16 Sep 2016 16:19:40 +0200 (CEST) Received: by mail-wm0-f54.google.com with SMTP id 1so44534446wmz.1 for ; Fri, 16 Sep 2016 07:19:40 -0700 (PDT) In-Reply-To: <1473348597-11904-1-git-send-email-droidluo@gmail.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" CC stable@dpdk.org 2016-09-08 10:29, Weiliang Luo: > When using rte_mempool_create(), the mempool handler is selected > depending on the flags given by the user: > - multi-consumer / multi-producer > - multi-consumer / single-producer > - single-consumer / multi-producer > - single-consumer / single-producer > > The flags were not properly tested, resulting in the selection of sc/sp > handler if sc/mp or mc/sp was asked. This can lead to corruption or > crashes because the get/put operations are not atomic. > > Fixes: 449c49b93a6b ("mempool: support handler operations") > > Signed-off-by: Weiliang Luo > Acked-by: Olivier Matz Applied, thanks