From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B93C1A04FD; Tue, 14 Jan 2020 08:02:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0BE6E1C22B; Tue, 14 Jan 2020 08:02:36 +0100 (CET) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id 9AC5E1C229 for ; Tue, 14 Jan 2020 08:02:33 +0100 (CET) Received: by mail-io1-f67.google.com with SMTP id z8so12688850ioh.0 for ; Mon, 13 Jan 2020 23:02:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KnEh5L3a/xq4t0ZvJi3nQPLywdYooEvoUK1Phi4d84g=; b=ebIg8inkFmlUTgvp/N7DTq0ux6A9K10eOS7F9oo7qiRlMxpIR8A98uOiDU8FrzSjF7 8YFo9rpTwIAKg/Cp8Big+OY+DB9n/3EHLAqq1ul9C5vbtKOF4ONPE2uoMe4KibDd8kfj 4ELWmfzXFrvOxQZNowp49Gc1YqYFxSuuuVnldN2vq2g3j2OznmjDPREMYgaduQrS9/RO Mne9Ii+yjrP9CsuyKhJAcUBCwjHrlUJcY0n6LOEYi0Gm+FQq8B8fsp0f7IHHnQ6fxofp O2imoH0YnBvdlqelq1UM2BZcJghLTrnGgKe+r/nClpqFRDNijau5bizH+H6igAPLEb8J HHmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KnEh5L3a/xq4t0ZvJi3nQPLywdYooEvoUK1Phi4d84g=; b=UsFqyHZFWSv51p63Djm8jM2IU0oaZSACqLn2NTNpUyIOZHT0U/G7XJlQox/86FzJLk 8sF8A02AGPQXDwmmhkUhG5FxlEUGeh3uCydCb5CMah8dmPvWaWjMBl7CXekcsaxxI/z1 35JzwqbE1ERc/C3sWBqf/qXVpMRDln8EX+d0xpo4pC7CcWYCMqErVfgM7bUkRUmKZgKv IiNuf+ikTyhTbsDXn9Z2GqxbrnKKmdyc5a59i6twfTGAGTLkoIgeNmvizKqUNyrC1NTW b6KBEsWMJHyCrpWnlaQQoCtNoSTIuowWPuk2t44BcSer0GZUzIbN4hK/6mN3DwfnZ6ez /OgA== X-Gm-Message-State: APjAAAXE/7bsarT8gFq0WZiu+VnyW8XYg7hobWgnA8jrZ9SS94LcfdqT 63Yx7r1I9ybCC69YhCtRx9cqOnl65WsrHBw9GRM= X-Google-Smtp-Source: APXvYqy87MmvCyiFdyYC/ZJMCbda5zAIptsa4t9saan2ARg9zgdbuj4nEycIF4UIyiXH88xwq3Zt0rEsISh2CNPx0mg= X-Received: by 2002:a5e:8e4d:: with SMTP id r13mr14756689ioo.60.1578985353105; Mon, 13 Jan 2020 23:02:33 -0800 (PST) MIME-Version: 1.0 References: <20191219104434.32578-1-kkanas@marvell.com> In-Reply-To: <20191219104434.32578-1-kkanas@marvell.com> From: Jerin Jacob Date: Tue, 14 Jan 2020 12:32:17 +0530 Message-ID: To: Krzysztof Kanas , Ferruh Yigit Cc: dpdk-dev , Harman Kalra , Pavan Nikhilesh Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] mempool/octeontx: fix error handling in initialization 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Dec 19, 2019 at 4:14 PM wrote: > > From: Krzysztof Kanas > > When octeontx_get_fpavf fails fpa pointer is used to get > pool_stack_base, which is then freed. > > Coverity issue: 351263 > > Fixes: 9bc692f83baa ("mempool/octeontx: add application domain validation") > Cc: pbhagavatula@marvell.com Cc: stable@dpdk.org > Signed-off-by: Krzysztof Kanas Acked-by: Jerin Jacob Applied to dpdk-next-net-mrvl/master. Thanks > --- > drivers/mempool/octeontx/octeontx_fpavf.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c > index c97267db3cc3..63f8fb3b500a 100644 > --- a/drivers/mempool/octeontx/octeontx_fpavf.c > +++ b/drivers/mempool/octeontx/octeontx_fpavf.c > @@ -305,10 +305,8 @@ octeontx_fpapf_pool_destroy(unsigned int gpool_index) > int ret = -1; > > fpa = octeontx_get_fpavf(gpool_index); > - if (fpa == NULL) { > - ret = -EINVAL; > - goto err; > - } > + if (fpa == NULL) > + return -EINVAL; > > hdr.coproc = FPA_COPROC; > hdr.msg = FPA_CONFIGSET; > -- > 2.21.0 >