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 B5645A0032 for ; Fri, 18 Feb 2022 13:41:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ADCF240395; Fri, 18 Feb 2022 13:41:02 +0100 (CET) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mails.dpdk.org (Postfix) with ESMTP id 0D1A641142 for ; Fri, 18 Feb 2022 13:41:02 +0100 (CET) Received: by mail-wm1-f41.google.com with SMTP id d14-20020a05600c34ce00b0037bf4d14dc7so6308143wmq.3 for ; Fri, 18 Feb 2022 04:41:02 -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=dxiWQuSP9r2KBSf3iEZBT47N4FcIa4vQizVobeDPzwI=; b=ZApsz1NcGfT6c0EObMZUg02WXnYVDMZkznfg70WJ6oDHIOLK1VG7NLKZlOHN/qgtdu 9+pxSKa99kryR26lwZ4IZ6kFetwPC9LeCCn18KnNJQePjzR87pRyUSUQMJoHhnV/rWQj M6splhM4chLzFlYxG1MYCR4qIQ19yWCGU2AJilk8wg4KhNdY8YrTOn0p3BDfoeDBdCe9 4M0d2JOq2kbaLEQh5SrXk71Bwb7nJerO/DL/pOtRi4cEjBMED5TD/Jf+7uqpSzNJzuTf 9JXTBIeNlqHKkmcP8PuER0svdt6WZr1QrlrCB19BJeHErfgGlXXPmCQVTFXUJzV0k3ZR C77Q== 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=dxiWQuSP9r2KBSf3iEZBT47N4FcIa4vQizVobeDPzwI=; b=zQVlvROSytC/kHYvBfR+hQ2R431aJTHYv0mU/dCy8wKm/+VbYrY62exCzXaZjZaUYW MAel2UtdwyAfMc7YLRtY2A8bw7Ysko5ojXA6UunGF6MmX5AgEjdpBlhyo/J7+fiIw5bx iWW1NZ8PE0IPhDqVsXkWOtBeBEanGkp7SNcpqMe/Xp503jyVdAscdFQfvvaPoPlakFXH jQP4SqdQRxXpVwsTs/vEcRc+8qA/lJGwMdgbj95TPTr+8RHfi08obvc3K0y3yDCY/RFB mwYp3RWc8i38VgtGFBujsu9RjKZY3TIhwMFDUKoXjiSSWG/CvVOjcfAdKlPVNtj1NpSh K09g== X-Gm-Message-State: AOAM532nAXsjo4TmehFp4r/raT5oji4dZ186tcijfuoMAAY7rWTcSsCS nU9kph+fjLBMfhptAXo2EW7ivOUaDqCLcmWf X-Google-Smtp-Source: ABdhPJy3v10w0lbncwhdP+JyaySL+7tUIA/Dku4+ab1YZfvGjfYLbqbWbvVxVOpuGzIizAqT5whazQ== X-Received: by 2002:a7b:cc94:0:b0:37b:dfc0:3bfa with SMTP id p20-20020a7bcc94000000b0037bdfc03bfamr6836567wma.189.1645188061745; Fri, 18 Feb 2022 04:41:01 -0800 (PST) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id y17sm4126362wma.5.2022.02.18.04.41.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:41:01 -0800 (PST) From: luca.boccassi@gmail.com To: Kalesh AP Cc: Ajit Khaparde , Somnath Kotur , dpdk stable Subject: patch 'net/bnxt: add null check for mark table' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:37:58 +0000 Message-Id: <20220218123931.1749595-29-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/893c784eef7036066057d3886c53ef66279a1c4c Thanks. Luca Boccassi --- >From 893c784eef7036066057d3886c53ef66279a1c4c Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Tue, 4 Jan 2022 14:08:15 +0530 Subject: [PATCH] net/bnxt: add null check for mark table [ upstream commit 8a553bdf261f4e05a774d243bf0278ac1baf55c8 ] During the port start, driver ignores mark table allocation failure. This could cause a segfault due to NULL pointer dereference in bnxt_set_mark_in_mbuf(). Fix this by checking the pointer validity before accessing it. Fixes: b87abb2e55cb ("net/bnxt: support marking packet") Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_rxr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index 43cb8057da..f923b35ce2 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -760,6 +760,9 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp, { uint32_t cfa_code = 0; + if (unlikely(bp->mark_table == NULL)) + return; + cfa_code = rte_le_to_cpu_16(rxcmp1->cfa_code); if (!cfa_code) return; -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:39.264424973 +0000 +++ 0029-net-bnxt-add-null-check-for-mark-table.patch 2022-02-18 12:37:37.598789865 +0000 @@ -1 +1 @@ -From 8a553bdf261f4e05a774d243bf0278ac1baf55c8 Mon Sep 17 00:00:00 2001 +From 893c784eef7036066057d3886c53ef66279a1c4c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8a553bdf261f4e05a774d243bf0278ac1baf55c8 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 44247d7200..9621809bd9 100644 +index 43cb8057da..f923b35ce2 100644 @@ -25 +26 @@ -@@ -824,6 +824,9 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp, +@@ -760,6 +760,9 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,