From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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=9KBHz/6fzqCoPxNHLcYiZ1yTZQGRlwHa7xAwRfowloA=; b=j++jMcYOgCC2QafLSyPiiM6f4+CSUwhJF2kxkfIzgvPVKzxaFb3a8bJyYAQr9P9nTE AXgM1X26/J1HCEtGrk0bXwBeg5KpHfZHecrzPpY5VKneVgkJQ7SlwuDbbAec2eE4w6OI bJ/8EitEjEo3JJrpZc3N8JuYPMmFHuIDVagcMRU/8gC0CueTf5w1dIZrTLULt9pGzQBX oSPHw8thpHdf+OQMxjO31Iumhst2R3RyyNKjx1MQS25ybcm78FnC1W1BdHCGGgGsMjld q333iQiHFyx6UGH8CncuQBYHRYbGJ60xOxdTSoZd7tPO+BmroOTuXHhyn2z16JKJElVs 2wRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=9KBHz/6fzqCoPxNHLcYiZ1yTZQGRlwHa7xAwRfowloA=; b=sva0rVT+WlT97eW67jX5BjXyJ0zNl1/gaeKtRQ8839xJWPcSn2Zr6Ndh186P7cQ86Q 5AZ0sp0t9mMYyIbyfBN10wUmOIyZA3/XzCn2OCNirFcBcztr3SaR/rGnlmPp2Du+wxhe HbyhPOYZKSJp7NdywmCCCey1/OziZhwgaf5XhGSHq2J3csA2rDlwDB4Fes8lOBjN7jnV gf4ks4S4uxUBOJQWd43ddtQ/ChbFVxoQMuCWIJR6gxyBaIN/l+AHggSvhVLXx1afJYJr tpxWaXqeQ34fyQIDS+tjGTbrA5xRvQHhvNfhciM897CdxnCwR3UFHAAAyXgV3Z06rA2f mQuA== X-Gm-Message-State: AIkVDXLnDR7GgK1lcwyIIq0yoYtYuFUQ/QUyg6WvAmOjoVLA55HNpQoiWzUheNGF0sGckfHk X-Received: by 10.28.217.136 with SMTP id q130mr12030821wmg.13.1485729450220; Sun, 29 Jan 2017 14:37:30 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id e6sm19744607wrc.30.2017.01.29.14.37.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Jan 2017 14:37:29 -0800 (PST) From: Thomas Monjalon To: Olivier Matz Cc: dev@dpdk.org, david.hunt@dpdk.org, stable@dpdk.org Date: Sun, 29 Jan 2017 23:37:28 +0100 Message-ID: <5164572.zkQ5vD8MeL@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1485191463-22992-1-git-send-email-olivier.matz@6wind.com> References: <1485191463-22992-1-git-send-email-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] mempool: fix stack handler dequeue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 22:37:30 -0000 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