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 E4EDDA0C4C for ; Mon, 12 Jul 2021 15:06:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB16B40685; Mon, 12 Jul 2021 15:06:53 +0200 (CEST) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mails.dpdk.org (Postfix) with ESMTP id 299C140685 for ; Mon, 12 Jul 2021 15:06:52 +0200 (CEST) Received: by mail-wr1-f44.google.com with SMTP id v5so25539978wrt.3 for ; Mon, 12 Jul 2021 06:06:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jgRBl0f4vBuTWcTB6tYFjUsuhAFW9bLyjxT1omulk9s=; b=iy56bIRKRMieFZa+05wsvPAXHhSZXCy927uzWS/d2Ndg0MNJ3GkObZ2fVtPcSdM5uk xuZs0syz3XokS7gdtG7BpBDhpZ5i/wRHY5C7TMPFVmHg9qVAxtiG6V0R1UVAcrzEJE6L +3/qVEJgKjvBAJGE40IHER07+kJrQfJC3cgdh3jcm3wFL6SrZ2AolxZ9UexfWfHwiJ4a G1jN0EvqP4vWIT8zilVoita7OSw4c6VW23gUsEG3SWBF0c8Jtt0nwwzpLYQi+7tjmCHY eGZRVt5sHxISYT2WNX/cWydUf+miu2T0+lQ9j5zpD/EvUZkUkC4GHLwGNcLUtC1gBMht HRcA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=jgRBl0f4vBuTWcTB6tYFjUsuhAFW9bLyjxT1omulk9s=; b=nPYDwLX3mR4CAW5AC1rzB4lQXCszdrRtVNeDlFaYP7gohRAMwvpFDhMmldsEaNiflS tEb8WPfxLiwYl4IxGiofGmtwyKU6HSdj4hrgc3IhtyUvT4CBgb+5voWEi4WNolqfF0or 3XNAlv8z2ugM0a6SQUw3TgwQbgRVCwY5CZ+7qUffSkZa01o1DTvTXsTgQwuhVq+LPRMI j1Vr3bpqWBUn+rOJmAi14dx8SL87dIra9Wz/EqzBNwD4RnrxLWs1DFWq9inYCTYT3qL0 WUJWGW6N3fJ8rydgwZCdsVs+Faaa4ytNGIkmWOWqYWF50ObpZdwdlAMMe5oiyA66T09C CmdA== X-Gm-Message-State: AOAM532lZmztHeDH6ZOn9vW6nE0UqAf6gjAFLmkpMo3SSuLs7BluxM0q amrjC7+5UXIzAWz+yXS5LgM= X-Google-Smtp-Source: ABdhPJwfPMaE718esvbT2xUz4HaGoVfrBT2o7J4d4c6Fk58czDe/HuDvDZt6j/CEwV98gLY22DyHDQ== X-Received: by 2002:adf:f946:: with SMTP id q6mr57800875wrr.283.1626095211928; Mon, 12 Jul 2021 06:06:51 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id y6sm551873wma.48.2021.07.12.06.06.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 06:06:51 -0700 (PDT) From: luca.boccassi@gmail.com To: Hongbo Zheng Cc: Min Hu , Jerin Jacob , David Marchand , dpdk stable Date: Mon, 12 Jul 2021 14:03:57 +0100 Message-Id: <20210712130551.2462159-2-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712130551.2462159-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'graph: fix null dereference in stats' has been queued to stable release 20.11.3 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/14/21. 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/7af7de2a52cf4a8174bfe51a233a8b39a5bd12eb Thanks. Luca Boccassi --- >From 7af7de2a52cf4a8174bfe51a233a8b39a5bd12eb Mon Sep 17 00:00:00 2001 From: Hongbo Zheng Date: Thu, 6 May 2021 15:16:27 +0800 Subject: [PATCH] graph: fix null dereference in stats [ upstream commit 2d2bf7de1afe750984073c4cc81ffa4d95550811 ] In function 'stats_mem_init', pointer 'stats' should be confirmed not null before memset it. Fixes: af1ae8b6a32c ("graph: implement stats") Signed-off-by: Hongbo Zheng Signed-off-by: Min Hu (Connor) Reviewed-by: Jerin Jacob Reviewed-by: David Marchand --- lib/librte_graph/graph_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_graph/graph_stats.c b/lib/librte_graph/graph_stats.c index 30e295d8b1..aa70929dc3 100644 --- a/lib/librte_graph/graph_stats.c +++ b/lib/librte_graph/graph_stats.c @@ -119,8 +119,8 @@ stats_mem_init(struct cluster *cluster, cluster_node_size = RTE_ALIGN(cluster_node_size, RTE_CACHE_LINE_SIZE); stats = realloc(NULL, sz); - memset(stats, 0, sz); if (stats) { + memset(stats, 0, sz); stats->fn = fn; stats->cluster_node_size = cluster_node_size; stats->max_nodes = 0; -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-12 13:41:37.022971247 +0100 +++ 0002-graph-fix-null-dereference-in-stats.patch 2021-07-12 13:41:36.150115528 +0100 @@ -1 +1 @@ -From 2d2bf7de1afe750984073c4cc81ffa4d95550811 Mon Sep 17 00:00:00 2001 +From 7af7de2a52cf4a8174bfe51a233a8b39a5bd12eb Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2d2bf7de1afe750984073c4cc81ffa4d95550811 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -17 +18 @@ - lib/graph/graph_stats.c | 2 +- + lib/librte_graph/graph_stats.c | 2 +- @@ -20 +21 @@ -diff --git a/lib/graph/graph_stats.c b/lib/graph/graph_stats.c +diff --git a/lib/librte_graph/graph_stats.c b/lib/librte_graph/graph_stats.c @@ -22,2 +23,2 @@ ---- a/lib/graph/graph_stats.c -+++ b/lib/graph/graph_stats.c +--- a/lib/librte_graph/graph_stats.c ++++ b/lib/librte_graph/graph_stats.c