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 89C39A00C2 for ; Thu, 3 Nov 2022 10:33:36 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74673427ED; Thu, 3 Nov 2022 10:33:36 +0100 (CET) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mails.dpdk.org (Postfix) with ESMTP id 54870427ED for ; Thu, 3 Nov 2022 10:33:35 +0100 (CET) Received: by mail-wr1-f49.google.com with SMTP id l14so1755483wrw.2 for ; Thu, 03 Nov 2022 02:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LZfvPAXdym+V+6dTF8AdN4EXYh4QP+5r7anx96bpHGY=; b=XXhvNWD7wL4yyPR2oLi1Vg72C8NiEtX6zIm7eAzShY/aO0xM4MHh+OiyMPGMC+DhiL H9bEF05WqtEBPHSEGhQpIYeagj6OeWlvKDNoM/8XQ2n9Cz5ytvRmFzzpRmQ8catku/Z+ OM5W5dtaAB+FTxMouNfI4vybF5Ms43ZPScIlqHFWQeSBS43GuAUYUPTM+uDA3ILI7Tre Dw8VUQpIY2HjTyjq/U0R2UhaGIkn6Jw8yiXZMruRJ5vKxUSVLKL362ctAV3D06eOKUCd lr0yFriDNEeGPbdaiIvQhXP1zin+KIv/9OCDIStJIFZeSu+JABLhuhoLjRgTOGKzVmxY mjrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LZfvPAXdym+V+6dTF8AdN4EXYh4QP+5r7anx96bpHGY=; b=cUaeWUk10WG/lEot4E3HIn9q2hrng01YmgVAO+BR33zEQA02KJgw6q6xn6bV7CQFxi No/vkQ/CzIlRrShJeB0B5c3b6XpXlOVnt4JGrJcnzkZJciFB7VxXZqzJkpyvqAs/YKXh REfW1Dd8hAQjoAy5KfTxZDiI07+/R4bPCxCp9L9pPXE62TKTEp7rudS7Z8Uu3HMrW74/ VfqGsW44rUrHl4M7LpMPCKti1M2O0brYCgNOxZ6qcrHFpVFFAGesvdzO/+drSRhWssAz qsYmNI6ce2B/iThT02kODX7k9f4ipMKUYz7NRPtW7dnH2NOjxTHWsO1T2GyBDbEUo6zT 6nyA== X-Gm-Message-State: ACrzQf1ifHPsSCgNyTbF5Dwrct6oM2M3kzuW6c40nF/wCHlrn8iOGTzU lFK/ChFVIU357gCYYtF1joX/raoPiTTDEHFT X-Google-Smtp-Source: AMsMyM4ikHpHexCqYEYeiAjpSgJW2DZ3CSEiQ3u1ZASW8W/fpJFEq34zIzQSQBBnlKMUIzTeL0GKvw== X-Received: by 2002:a5d:6943:0:b0:236:7222:a727 with SMTP id r3-20020a5d6943000000b002367222a727mr18514147wrw.716.1667468015076; Thu, 03 Nov 2022 02:33:35 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id g13-20020a05600c310d00b003c6cd82596esm5216327wmo.43.2022.11.03.02.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 02:33:34 -0700 (PDT) From: luca.boccassi@gmail.com To: Shiqi Liu <835703180@qq.com> Cc: dpdk stable Subject: patch 'node: check Rx element allocation' has been queued to stable release 20.11.7 Date: Thu, 3 Nov 2022 09:27:58 +0000 Message-Id: <20221103092758.1099402-100-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103092758.1099402-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-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.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/cf01654a4a7d376605b282244cdb09753efb5ce9 Thanks. Luca Boccassi --- >From cf01654a4a7d376605b282244cdb09753efb5ce9 Mon Sep 17 00:00:00 2001 From: Shiqi Liu <835703180@qq.com> Date: Thu, 7 Jul 2022 17:23:45 +0800 Subject: [PATCH] node: check Rx element allocation [ upstream commit d914c01036f7ca9c5e01f899df5961865b604b66 ] As the possible failure of the malloc(), the not_checked and checked could be NULL pointer. Therefore, it should be better to check it in order to avoid the dereference of the NULL pointer. Fixes: fa8054c8c889 ("examples/eventdev: add thread safe Tx worker pipeline") Signed-off-by: Shiqi Liu <835703180@qq.com> --- lib/librte_node/ethdev_ctrl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_node/ethdev_ctrl.c b/lib/librte_node/ethdev_ctrl.c index 13b8b705f0..8a7429faa3 100644 --- a/lib/librte_node/ethdev_ctrl.c +++ b/lib/librte_node/ethdev_ctrl.c @@ -77,6 +77,8 @@ rte_node_eth_config(struct rte_node_ethdev_config *conf, uint16_t nb_confs, /* Add it to list of ethdev rx nodes for lookup */ elem = malloc(sizeof(ethdev_rx_node_elem_t)); + if (elem == NULL) + return -ENOMEM; memset(elem, 0, sizeof(ethdev_rx_node_elem_t)); elem->ctx.port_id = port_id; elem->ctx.queue_id = j; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:31.605765422 +0000 +++ 0100-node-check-Rx-element-allocation.patch 2022-11-03 09:27:25.569426235 +0000 @@ -1 +1 @@ -From d914c01036f7ca9c5e01f899df5961865b604b66 Mon Sep 17 00:00:00 2001 +From cf01654a4a7d376605b282244cdb09753efb5ce9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d914c01036f7ca9c5e01f899df5961865b604b66 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -16 +17 @@ - lib/node/ethdev_ctrl.c | 2 ++ + lib/librte_node/ethdev_ctrl.c | 2 ++ @@ -19,4 +20,4 @@ -diff --git a/lib/node/ethdev_ctrl.c b/lib/node/ethdev_ctrl.c -index 8d2e05a831..37df0431b8 100644 ---- a/lib/node/ethdev_ctrl.c -+++ b/lib/node/ethdev_ctrl.c +diff --git a/lib/librte_node/ethdev_ctrl.c b/lib/librte_node/ethdev_ctrl.c +index 13b8b705f0..8a7429faa3 100644 +--- a/lib/librte_node/ethdev_ctrl.c ++++ b/lib/librte_node/ethdev_ctrl.c