From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 07737A04A3 for ; Fri, 5 Jun 2020 20:27:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CF8A71D510; Fri, 5 Jun 2020 20:27:05 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 691F11D51A for ; Fri, 5 Jun 2020 20:27:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591381624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oCflO1fti3jtYGkOmAz69V/qu+gihSkiV4yv8gG22GE=; b=MZDlgPkxg0APaTwl9G5emOABA7oK0+5YBZIwb9e9ra9S7m9GRJULf+9P1exfoxlqp38uKi X+uWS1IquY2+bIufyMQrTMmD7KhbMXHQDYASlamA6dsJo82Aey+2nlvIzefzf3f5cEq583 XkesJN1Cudxdk3PPHNUr9A9Jl3GHO6o= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-256-z_uPcPQIM8WWFu-yr4Rn2w-1; Fri, 05 Jun 2020 14:26:59 -0400 X-MC-Unique: z_uPcPQIM8WWFu-yr4Rn2w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C5E9A1005510; Fri, 5 Jun 2020 18:26:58 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id E337960C47; Fri, 5 Jun 2020 18:26:57 +0000 (UTC) From: Kevin Traynor To: Kalesh AP Cc: Bernard Iremonger , dpdk stable Date: Fri, 5 Jun 2020 19:24:36 +0100 Message-Id: <20200605182525.22483-39-ktraynor@redhat.com> In-Reply-To: <20200605182525.22483-1-ktraynor@redhat.com> References: <20200605182525.22483-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'app/testpmd: fix memory failure handling for i40e DDP' has been queued to LTS release 18.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 LTS release 18.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/10/20. 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-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/ae339eaf191361f241e27085acb27c9d2a22f8a1 Thanks. Kevin. --- >From ae339eaf191361f241e27085acb27c9d2a22f8a1 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Fri, 8 May 2020 10:20:24 +0530 Subject: [PATCH] app/testpmd: fix memory failure handling for i40e DDP [ upstream commit 489bdbbfc269c819ec679605d1f0e8ad058789f4 ] In cmd_ddp_get_list_parsed(), elements of "p_list" are accessed even after the memory allocation for "p_list" fails. With this patch, this null pointer dereference is avoided as we return when there is malloc failure. Fixes: e088907bb851 ("app/testpmd: add command for getting loaded DDP profiles") Signed-off-by: Kalesh AP Acked-by: Bernard Iremonger --- app/test-pmd/cmdline.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 2913de68f4..abf803418c 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -16460,6 +16460,8 @@ cmd_ddp_get_list_parsed( size = PROFILE_INFO_SIZE * MAX_PROFILE_NUM + 4; p_list = (struct rte_pmd_i40e_profile_list *)malloc(size); - if (!p_list) + if (!p_list) { printf("%s: Failed to malloc buffer\n", __func__); + return; + } if (ret == -ENOTSUP) -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-06-05 19:20:52.985239100 +0100 +++ 0039-app-testpmd-fix-memory-failure-handling-for-i40e-DDP.patch 2020-06-05 19:20:50.815040700 +0100 @@ -1 +1 @@ -From 489bdbbfc269c819ec679605d1f0e8ad058789f4 Mon Sep 17 00:00:00 2001 +From ae339eaf191361f241e27085acb27c9d2a22f8a1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 489bdbbfc269c819ec679605d1f0e8ad058789f4 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index b040630c54..996a498768 100644 +index 2913de68f4..abf803418c 100644 @@ -25 +26 @@ -@@ -16892,6 +16892,8 @@ cmd_ddp_get_list_parsed( +@@ -16460,6 +16460,8 @@ cmd_ddp_get_list_parsed(