From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=QfSURUROR9WOjKpWAoKTF+rVadx7SNJq9n3RuJTd/so=; b=FAre2ySq/BdrtmmByscCyoeE9sap1cC4DE+ObRD9RUkV2kJAWM5S33R1bTuJdGMG/T VQG3D7Q1zYMFDHxVt8Ss4SGUlikV9XGuqeIqe7JZvYhhjWVICd3DkNY1Bb46SqE0LWya 9dVisMr1NYFDMdqUWuZf6Uh7V10cHsMqSSUI8/CgElB0fWj49VGD4bzOkwk5EhYUS2or jgahUQhf8QQxqFUWQUxpHI+oDxE2nUmjZQpouU8UaCDzke30zgzWZTwaWW6QmHA81u9Q +RVSQxChr3u+uWa23L5szv4y4fKPXNmmv4lPL5zs067dAWedoJ/Hs0wzUInHCgTqzChZ uo9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=QfSURUROR9WOjKpWAoKTF+rVadx7SNJq9n3RuJTd/so=; b=LvyjaUxJ27p6/YTfvwGiYzP2JvByDYFtgbJYJ82WBV3y0hoUjD+actT0MiNhNwWJwb nRkr3KwKJ4niewSmfQrRyj+2Uk9PzRNZ9YDnMIMkYKJOfywRYv4Z3NjQAz3iQBrTqo2c gdxDtVeeQueCjjcgW1huyeCBcx39X2gq8yB/y1fYHE4nohpFJFoIojAXP34X94Z7p1rI aYGxPaeysbWjTmekSqK+buwfoQsyDgGWE0ltuJTyNVwgAl9ELjgi+9mxupDXtU1FSnwN DZQcYAOlLlmmEhS1BTMrSPtQkNJqVoumUXqmsdcq+maS0nQ1yzb3wvQVz4xx3mk/oxsW 0ahg== X-Gm-Message-State: AE9vXwPiRi26AgBjJAgP2TotXTp3eslLRkvv5WRXw8LBXRk189rrHOKhO7BC4HREW0puclSi X-Received: by 10.194.96.136 with SMTP id ds8mr12896881wjb.3.1474035580412; Fri, 16 Sep 2016 07:19:40 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id 123sm7626293wmj.5.2016.09.16.07.19.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Sep 2016 07:19:39 -0700 (PDT) From: Thomas Monjalon To: Weiliang Luo Cc: dev@dpdk.org, stable@dpdk.org, olivier.matz@6wind.com Date: Fri, 16 Sep 2016 16:19:38 +0200 Message-ID: <43354735.jbAHAiVkRh@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1473348597-11904-1-git-send-email-droidluo@gmail.com> References: <1473348597-11904-1-git-send-email-droidluo@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] mempool: fix corruption due to invalid handler X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2016 14:19:40 -0000 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