From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] mempool: fix stack handler dequeue Date: Sun, 29 Jan 2017 23:37:28 +0100 Message-ID: <5164572.zkQ5vD8MeL@xps13> References: <1485191463-22992-1-git-send-email-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, david.hunt@dpdk.org, stable@dpdk.org To: Olivier Matz Return-path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 755F4BD2A for ; Sun, 29 Jan 2017 23:37:30 +0100 (CET) Received: by mail-wm0-f50.google.com with SMTP id v77so23343341wmv.0 for ; Sun, 29 Jan 2017 14:37:30 -0800 (PST) In-Reply-To: <1485191463-22992-1-git-send-email-olivier.matz@6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2017-01-23 18:11, Olivier Matz: > The return value of the stack handler is wrong: it should be 0 on > success, not the number of objects dequeued. > > This could lead to memory leaks depending on how the caller checks the > return value (ret < 0 or ret != 0). This was also breaking autotests > with debug enabled, because the debug cookies are only updated when the > function returns 0, so the cookies were not updated, leading to > an abort(). > > Fixes: 295a530b0844 ("mempool: add stack mempool handler") > > CC: stable@dpdk.org > Signed-off-by: Olivier Matz Applied, thanks