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 D9D94A0C41 for ; Tue, 30 Nov 2021 17:40:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D42CF410F7; Tue, 30 Nov 2021 17:40:43 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 1DB0F411A7 for ; Tue, 30 Nov 2021 17:40:42 +0100 (CET) Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 00EDE3F044 for ; Tue, 30 Nov 2021 16:40:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290442; bh=sHXwE0DnHkEKvvWSFMqcR/FzM4vAmIDOBzyqpkqsKBQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gTDdeBb7OYIXuGnkpLtyFwsGcAD5RW8jlgvGfLihD890yBaKCk4LDY0ueTa+IC0x6 Sjt/ksbM4g3aCIxzseFbfy3CxMhmizlBASXlgXwIIBhG/dh5SnkxhDOozvRWfo8jXW aHr7EnxZHwLP4NPshH+Nll+Z9V4OiGI738BOz9iVNDGatYHhg6ZKQeeMvGilpMRZXC vOaxehbBw0JXxFGldXTZ2QVAUtwTchn4hclwnTfxMDaw1LszPE40Guz3Zsl63AAQuU cS1j+g8vAc4plRmaMA73i0ibhEeE2sJlhQaXj8/L51rdiwRKj5ukf5Cq/qtsEdLmSQ Mjg999qOT3d5A== Received: by mail-ed1-f71.google.com with SMTP id p4-20020aa7d304000000b003e7ef120a37so17404198edq.16 for ; Tue, 30 Nov 2021 08:40:41 -0800 (PST) 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=sHXwE0DnHkEKvvWSFMqcR/FzM4vAmIDOBzyqpkqsKBQ=; b=t9xU8XJRQMAUysr5lLWfU+YnwMqdZHy15S4u0sfoQq++jpYeV1l6vBn7JLKcDfBj8s IF0Bc1rYIWB7wQc6HQvYyERufuS3DUT73wVTBoe8NJV+T3niwHb4mtnKy7gZUhm7vG+8 rK6/kcTkQlc7uXEPQaq0T2CQ+KAgYTf3aqon7ZOmE/fbEYBDR8QSBAqtJ7ejBNiJWhFl vmwqUX2nTmp7y4Fufdp1fhWCoqK0NPkHUaZwiodfxglv2xO4/TKm7isFdxBAegvrdC+8 KWmyKEL/kocu9pxwOVLzmnrfFjQJS9e5KSJKBamggTesltcBIwD+Eb14Hfn66elsPzyZ u4OA== X-Gm-Message-State: AOAM531RRUbi3qUUoS2pgjH+w7y4OcqJPEmyrJpgAKoon7i1SCdVqoRW ZDfAFf5GSmXlyEMb+YllEb7cmjXKCnDYe3vgMRrRT1G4BqX0BxrYeJPq11zOlceZE/s5MKCJN5t N+kDkResf8Ov7xUcz1TrqUe0T X-Received: by 2002:a05:6402:1768:: with SMTP id da8mr110620edb.252.1638290441726; Tue, 30 Nov 2021 08:40:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/koNDAwU58GVPkibRc7wp3w1ifPMxWW+zI4DpXpEt5sUqCkDi1HLk2cTSq9G/t5uLG7ykmA== X-Received: by 2002:a05:6402:1768:: with SMTP id da8mr110595edb.252.1638290441541; Tue, 30 Nov 2021 08:40:41 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id yd20sm9297785ejb.47.2021.11.30.08.40.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:40:40 -0800 (PST) From: christian.ehrhardt@canonical.com To: Sunil Kumar Kori Cc: Ferruh Yigit , dpdk stable Subject: patch 'app/testpmd: fix access to DSCP table entries' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:34:53 +0100 Message-Id: <20211130163605.2460997-89-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.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 19.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/9f2a1bcfe2e2acbb12dff4aa74b660e015a0a5ba Thanks. Christian Ehrhardt --- >From 9f2a1bcfe2e2acbb12dff4aa74b660e015a0a5ba Mon Sep 17 00:00:00 2001 From: Sunil Kumar Kori Date: Tue, 12 Oct 2021 14:03:17 +0530 Subject: [PATCH] app/testpmd: fix access to DSCP table entries [ upstream commit b314a4a664266f691167c29de6bc5ce728346c02 ] During parsing of DSCP entries, memory is allocated and assigned to *dscp_table. Later on, same memory is accessed using *dscp_table[i++]. Due to higher precedence for array subscript, dscp_table[i++] will be executed first which actually does not point to the same memory which was allocated previously for DSCP table entries. Fixes: 459463ae6c26 ("app/testpmd: fix memory allocation for DSCP table") Signed-off-by: Sunil Kumar Kori Reviewed-by: Ferruh Yigit --- app/test-pmd/cmdline_mtr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c index c6e7529b3d..9f13de0ccd 100644 --- a/app/test-pmd/cmdline_mtr.c +++ b/app/test-pmd/cmdline_mtr.c @@ -92,13 +92,13 @@ parse_dscp_table_entries(char *str, enum rte_color **dscp_table) while (1) { if (strcmp(token, "G") == 0 || strcmp(token, "g") == 0) - *dscp_table[i++] = RTE_COLOR_GREEN; + (*dscp_table)[i++] = RTE_COLOR_GREEN; else if (strcmp(token, "Y") == 0 || strcmp(token, "y") == 0) - *dscp_table[i++] = RTE_COLOR_YELLOW; + (*dscp_table)[i++] = RTE_COLOR_YELLOW; else if (strcmp(token, "R") == 0 || strcmp(token, "r") == 0) - *dscp_table[i++] = RTE_COLOR_RED; + (*dscp_table)[i++] = RTE_COLOR_RED; else { free(*dscp_table); return -1; -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:11.127045618 +0100 +++ 0089-app-testpmd-fix-access-to-DSCP-table-entries.patch 2021-11-30 16:50:05.882874204 +0100 @@ -1 +1 @@ -From b314a4a664266f691167c29de6bc5ce728346c02 Mon Sep 17 00:00:00 2001 +From 9f2a1bcfe2e2acbb12dff4aa74b660e015a0a5ba Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b314a4a664266f691167c29de6bc5ce728346c02 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index b5dcfdadcf..ad7ef6ad98 100644 +index c6e7529b3d..9f13de0ccd 100644 @@ -27 +28 @@ -@@ -101,13 +101,13 @@ parse_dscp_table_entries(char *str, enum rte_color **dscp_table) +@@ -92,13 +92,13 @@ parse_dscp_table_entries(char *str, enum rte_color **dscp_table)