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 E6B05455AD for ; Mon, 15 Jul 2024 17:29:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E1A6240BA6; Mon, 15 Jul 2024 17:29:25 +0200 (CEST) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by mails.dpdk.org (Postfix) with ESMTP id 821DD402DD for ; Mon, 15 Jul 2024 17:29:24 +0200 (CEST) Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2eecd2c6432so61611201fa.3 for ; Mon, 15 Jul 2024 08:29:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057364; x=1721662164; darn=dpdk.org; 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=toXFgqXjAPjp536t4x6XYhiI6YNM5aJVnMIgRsQrhZU=; b=bsw8m5+ouPV5zHis12mr6E6dL7ghUKMJB9QXvaJm8s0kH6ug6UgiNHNY9iUrD3LfMM +GTePnosJvPUCQAUjTy7n/UvfZAdoeIYZMmzCwAW9aHF88HfS1KaNi2y293j+f8Dogaa XQhNaWN3QJVP8/ShCp20adgxZlfc62CvYj9GZNEwl0TrEaofxqAZeZ5blwrYlapd0nOe X57T+LHcjMsHDV53d31cvSnHictYKs+KYc+DGbJSVsqQg0hDM7g7e03DKCRDc424cQJT uJ9mO/KFEpAux/kUAJh+psPOvdEpytw5xOZTqHSD42brm1Oiay8SpAGZW+9iIMvFs9UY vL9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057364; x=1721662164; 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=toXFgqXjAPjp536t4x6XYhiI6YNM5aJVnMIgRsQrhZU=; b=iB53bEiEL39dicR2ehnhKfDYfkrBOE8EB22fYAHOTpe7y21a6ACX1QAL2ppxBJvmiG 52hcr5ddBYBmBZ1uo420sBXQW9IQcpx2pmmd8mOyGfyTCjbk1Uo1O3TjxKoWQ0GcGaf9 lXCAIvV9b/FqrRCXwspNtQZPMf8Q353v+wZHt+vBRrKUyiRa5OL2TdPCCDZ/FAzVi4ow 1gGKyjCKfiXEJljC8EueaMyGYYf7UU0ONDk6g3eWU6dHsaJ4KSGDnnTqRfaFEPW4x/EL SnrS+8q6d7Rl3fw71CZ5P5ziIXdxYltz4AmBcMp5CMkJuWiiVsIL32BKXsVKS5NwyoTH +JqQ== X-Forwarded-Encrypted: i=1; AJvYcCX9dbQce9XQGsGv9Bwnjt3EFyYqdHg3zvbEoGvOeDG8jwVk44GU12Zra+4+9iUfK7j/VwYssoTIpJmULtAHGuU= X-Gm-Message-State: AOJu0YyCv5QRl399K3Xb5UUI8+esZZFbQqDx5lFrQSwTSVXb9aiVNmvK HPpGiNAWGasaph1XNQNcTrfQDL2ye1C7sUJaDDfxVufjDFKl6XwPCe6vYSMIl74= X-Google-Smtp-Source: AGHT+IG65H/Vzfn7+5pxj7dUR6fHQdhrJ8lT5i0/5sfE0BvAnE2Hdaa6U/bkn+UfLkVJgkmOR9Eamw== X-Received: by 2002:a2e:894e:0:b0:2ec:5ff1:2271 with SMTP id 38308e7fff4ca-2eef2d70c03mr1938741fa.18.1721057363917; Mon, 15 Jul 2024 08:29:23 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427a5ef550asm91065965e9.46.2024.07.15.08.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:29:23 -0700 (PDT) From: luca.boccassi@gmail.com To: Stefan Wegrzyn Cc: Ian Stokes , Bruce Richardson , dpdk stable Subject: patch 'net/ice/base: fix pointer to variable outside scope' has been queued to stable release 22.11.6 Date: Mon, 15 Jul 2024 16:26:22 +0100 Message-Id: <20240715152704.2229503-44-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-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 22.11.6 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/17/24. 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/7f57a7a2ce3ccdc1061b08d0df6a0a1d02784df1 Thanks. Luca Boccassi --- >From 7f57a7a2ce3ccdc1061b08d0df6a0a1d02784df1 Mon Sep 17 00:00:00 2001 From: Stefan Wegrzyn Date: Tue, 25 Jun 2024 12:12:10 +0100 Subject: [PATCH] net/ice/base: fix pointer to variable outside scope [ upstream commit 794adf885cbbc949b4a292ce98bc57d77ea77391 ] Currently, the 'temp' variable is in smaller scope than 'first_teid_ptr' which can point to it. This means on new loop iterations the memory goes out of scope and we can end up with a dangling pointer. Move 'temp' to outside of the loop to fix it. Fixes: 254f19c8c061 ("net/ice/base: modify recursive way of adding nodes") Signed-off-by: Stefan Wegrzyn Signed-off-by: Ian Stokes Acked-by: Bruce Richardson --- drivers/net/ice/base/ice_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index b16b27dcbf..d505c8d16c 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -1057,11 +1057,11 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi, u32 *first_teid_ptr = first_node_teid; u16 new_num_nodes = num_nodes; enum ice_status status = ICE_SUCCESS; + u32 temp; *num_nodes_added = 0; while (*num_nodes_added < num_nodes) { u16 max_child_nodes, num_added = 0; - u32 temp; status = ice_sched_add_nodes_to_hw_layer(pi, tc_node, parent, layer, new_num_nodes, -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:36.872273522 +0100 +++ 0044-net-ice-base-fix-pointer-to-variable-outside-scope.patch 2024-07-15 16:19:34.572206549 +0100 @@ -1 +1 @@ -From 794adf885cbbc949b4a292ce98bc57d77ea77391 Mon Sep 17 00:00:00 2001 +From 7f57a7a2ce3ccdc1061b08d0df6a0a1d02784df1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 794adf885cbbc949b4a292ce98bc57d77ea77391 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index d694bfd414..c9d70fb043 100644 +index b16b27dcbf..d505c8d16c 100644 @@ -25 +26 @@ -@@ -1069,11 +1069,11 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi, +@@ -1057,11 +1057,11 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi, @@ -28 +29 @@ - int status = 0; + enum ice_status status = ICE_SUCCESS;