From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5F825A0032 for ; Fri, 18 Feb 2022 13:45:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5ABBF40395; Fri, 18 Feb 2022 13:45:41 +0100 (CET) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mails.dpdk.org (Postfix) with ESMTP id 8DDE84113F for ; Fri, 18 Feb 2022 13:45:39 +0100 (CET) Received: by mail-wr1-f53.google.com with SMTP id d27so14418336wrb.5 for ; Fri, 18 Feb 2022 04:45:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4/Hg5HZJHpBDHAcc+IUF4+v0I7IkvOkXyCGIwo6Uk7Y=; b=ARToOKwWk7ulSvbbuM1XC70dbnZOaoXwuIOWu3GzB0GcIpGV5QnjLYwJfbjLvbL9iz Ege4XQ8AStG10bWA18O0yYVFY7qZL3xvnzyOGTYC2uBTpMF6IBIM2KCyDvxSgnnrotHf nVyPxMR5juxBuJMzxLYWJxBMfk8GwEZwxWrexoH8j3BBCIQqJz4W5y2cHkh2GwY45fXM YUizcsrouOJaPT8Nn+DZKbfxU0Sp25a6zNzsgUGHnXcfSGbIOUTDMPsZevBeCWzvj34u CuoRBbvQx4k/qgDtE135XXiJjTNFX93XzshIJS9b3F/82Ad2ln66I5XWgpOFgj0m6MQX TlyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4/Hg5HZJHpBDHAcc+IUF4+v0I7IkvOkXyCGIwo6Uk7Y=; b=QzZFED/H0BlxTl6I3xk+p6LPXHLIt09GiPmegH4i6SL2Nm1RpOCaWxQxb9QmmB7Oem cPugH5eGxgZAT4maLksUVpfGpZshtD7QpSuD1WnTRBpsqMKR7QAERZiIrLb4ddlUSS1I HhwLl+k8/t1rN7uK8Ejifn8QIBKRnWexgy2bMrfHS9k++/uShoTJ3ZP2/ID31GscW7Jt R7NNwCpO42mb1aWgRzElimyxiJvisOR1y+xatvew4z3hBBjNZqTSVk4Y3UhWMcQ0lf1W AIKq/s+twHCcq7gVlnbNeKUSRToh6xz16Q8W9tmq1TWiY8T3eLLIIH5M+4VgIzOQYl59 4m5A== X-Gm-Message-State: AOAM5302Im8eR2rgyE1nfz3eRBdMqYkRQetBwt8MG41W7QL//gsP7YYH 0K+BJsrXRYf/mAsuinMfTF03FLg6xS0Mv4/U X-Google-Smtp-Source: ABdhPJzyAdxwpxsamvYHfRX8QAsRX8DGVTE5yz6ZZOvJb4ErCjUlymzpVC6yHzK7CymwE4xoZTWpjA== X-Received: by 2002:adf:df8d:0:b0:1e7:68ca:3e3a with SMTP id z13-20020adfdf8d000000b001e768ca3e3amr5683754wrl.533.1645188339239; Fri, 18 Feb 2022 04:45:39 -0800 (PST) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id bk5sm28244329wrb.10.2022.02.18.04.45.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:45:38 -0800 (PST) From: luca.boccassi@gmail.com To: Weiguo Li Cc: Akhil Goyal , dpdk stable Subject: patch 'compress/octeontx: fix null pointer dereference' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:39:28 +0000 Message-Id: <20220218123931.1749595-119-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/20/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/bdd4b322cf9b8575364d889fb508e3bd4ab6c05c Thanks. Luca Boccassi --- >From bdd4b322cf9b8575364d889fb508e3bd4ab6c05c Mon Sep 17 00:00:00 2001 From: Weiguo Li Date: Tue, 25 Jan 2022 22:33:15 +0800 Subject: [PATCH] compress/octeontx: fix null pointer dereference [ upstream commit b072930fb10a0471d69db5de341ea87a0d1561cc ] Check for memory allocation failure is added to avoid null pointer dereference. Fixes: c378f084d6e3 ("compress/octeontx: add device setup ops") Signed-off-by: Weiguo Li Acked-by: Akhil Goyal --- drivers/compress/octeontx/otx_zip_pmd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c index bee90fc7cd..ff40968244 100644 --- a/drivers/compress/octeontx/otx_zip_pmd.c +++ b/drivers/compress/octeontx/otx_zip_pmd.c @@ -392,6 +392,8 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id, } name = rte_malloc(NULL, RTE_COMPRESSDEV_NAME_MAX_LEN, 0); + if (name == NULL) + return (-ENOMEM); snprintf(name, RTE_COMPRESSDEV_NAME_MAX_LEN, "zip_pmd_%u_qp_%u", dev->data->dev_id, qp_id); @@ -399,8 +401,10 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id, /* Allocate the queue pair data structure. */ qp = rte_zmalloc_socket(name, sizeof(*qp), RTE_CACHE_LINE_SIZE, socket_id); - if (qp == NULL) + if (qp == NULL) { + rte_free(name); return (-ENOMEM); + } qp->name = name; -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:42.297298659 +0000 +++ 0119-compress-octeontx-fix-null-pointer-dereference.patch 2022-02-18 12:37:37.882796208 +0000 @@ -1 +1 @@ -From b072930fb10a0471d69db5de341ea87a0d1561cc Mon Sep 17 00:00:00 2001 +From bdd4b322cf9b8575364d889fb508e3bd4ab6c05c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b072930fb10a0471d69db5de341ea87a0d1561cc ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 26cdce60a8..f9b8f7a1ec 100644 +index bee90fc7cd..ff40968244 100644 @@ -22 +23 @@ -@@ -391,6 +391,8 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id, +@@ -392,6 +392,8 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id, @@ -31 +32 @@ -@@ -398,8 +400,10 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id, +@@ -399,8 +401,10 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,