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 0176DA04F0 for ; Thu, 19 Dec 2019 15:40:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DF5141BFD5; Thu, 19 Dec 2019 15:40:30 +0100 (CET) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id B1AC71BFEB for ; Thu, 19 Dec 2019 15:40:29 +0100 (CET) Received: by mail-wm1-f68.google.com with SMTP id 20so5748100wmj.4 for ; Thu, 19 Dec 2019 06:40:29 -0800 (PST) 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=lWWzDT3SVwS3V6JvrjTGfGrop8EMF9AkiF//qacls84=; b=mhoPVcJ0Hvvkulh/wrTxMCrKhVKA6cSTF2ZgSdUzpuOup08ffMZJrWT2cop8cWqdOd v641zIQiNmQn4kGLqipMpEizvbHYyDIcprlHaZt1gnN7qGJyraNatftHlulPY4xKz3bg fIepRif8Kg25m6d8obKLsjhoo4kPVEPkE+zxzd5y0kM3uVSL2OgOFYChUyY/L0AfMBqt +4mK1xMpFMBtQHULGggD12h8CzXHMibjBJfVhlOlAMInZiPtbrcn3LB53eS+mh5Nmwuy NU4MJosoGs3x2MV4X5q4ImeqzpabrhdPUnw5YxYtTXW/J6m4Ws/+KsAGzw0zH4IQLv9Q xZWw== 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=lWWzDT3SVwS3V6JvrjTGfGrop8EMF9AkiF//qacls84=; b=CESOwmQV084muXE2kpJ3pZxQmJnOTm/yD6O6CA8y6u7+TevkSwCxvqm3aJ2oSesFL1 nuCyPU5WmcFZbHtuBSGIL1NB+eSwzAeenpu42wsNQKfCfn0TLXIybi+WR0TjivGRLb5Y Ieoz+DZ2dYBVp6ORwoMoDlMS7MI8ub/25KZRJTjP5Hj+l05wWToQ2eaGs1jrxI/2h6PR Sqn5nTTeAoVjmeaUPgiCNf0Z9uppLg5HEq82E+GP2hw6k9yb2v55bnzbDThPEsXogBxz OUeCPccZyx3gKBTaUCeBxdOANB7kLPvgYb3QNBz/4Eu5pdfEjt0K8vyUdQWThKTIrFo2 20hg== X-Gm-Message-State: APjAAAUAfiD2EsRBXI7/ETUxl7ABnhJdBdw297A07yghrbsNZAW/H+DL OkIqTprQTzRXqXrX9rkYd0osjjZOLj4= X-Google-Smtp-Source: APXvYqw9R1Z02fEOZNoQW6XT0jPYXRbs+kjFjaV5dY1J3M5uOZ75b8RsSMnfRdyklnJM2YMBnkuesw== X-Received: by 2002:a05:600c:290f:: with SMTP id i15mr10674088wmd.115.1576766429306; Thu, 19 Dec 2019 06:40:29 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id a133sm6407848wme.29.2019.12.19.06.40.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:40:28 -0800 (PST) From: luca.boccassi@gmail.com To: Andrzej Ostruszka Cc: dpdk stable Date: Thu, 19 Dec 2019 14:34:08 +0000 Message-Id: <20191219143447.21506-101-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/dpaa2: fix possible use of uninitialized vars' has been queued to LTS release 17.11.10 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 17.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/21/19. 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. Thanks. Luca Boccassi --- >From 89d047629f76872094fbbdd7bb324c6b82fd50dd Mon Sep 17 00:00:00 2001 From: Andrzej Ostruszka Date: Thu, 7 Nov 2019 16:03:14 +0100 Subject: [PATCH] net/dpaa2: fix possible use of uninitialized vars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 7bbc7dc431a66e81514219f1734ed263a3db3359 ] This patch fixes 'maybe-uninitialized' warnings reported by compiler when using LTO. Compiler warning pointing to this error (with LTO enabled): error: ‘kg_cfg.extracts[0].masks[0].mask’ may be used uninitialized in this function [-Werror=maybe-uninitialized] extr->masks[j].mask = cfg->extracts[i].masks[j].mask; Fixes: 16bbc98a3e63 ("bus/fslmc: update MC to 10.3.x") Signed-off-by: Andrzej Ostruszka --- drivers/net/dpaa2/mc/dpkg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/dpaa2/mc/dpkg.c b/drivers/net/dpaa2/mc/dpkg.c index 3f98907f49..34d37bfd88 100644 --- a/drivers/net/dpaa2/mc/dpkg.c +++ b/drivers/net/dpaa2/mc/dpkg.c @@ -96,7 +96,10 @@ dpkg_prepare_key_cfg(const struct dpkg_profile_cfg *cfg, uint8_t *key_cfg_buf) dpkg_set_field(extr->extract_type, EXTRACT_TYPE, cfg->extracts[i].type); - for (j = 0; j < DPKG_NUM_OF_MASKS; j++) { + if (extr->num_of_byte_masks > DPKG_NUM_OF_MASKS) + return -EINVAL; + + for (j = 0; j < extr->num_of_byte_masks; j++) { extr->masks[j].mask = cfg->extracts[i].masks[j].mask; extr->masks[j].offset = cfg->extracts[i].masks[j].offset; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:30.345947534 +0000 +++ 0101-net-dpaa2-fix-possible-use-of-uninitialized-vars.patch 2019-12-19 14:32:26.233300364 +0000 @@ -1,4 +1,4 @@ -From 7bbc7dc431a66e81514219f1734ed263a3db3359 Mon Sep 17 00:00:00 2001 +From 89d047629f76872094fbbdd7bb324c6b82fd50dd Mon Sep 17 00:00:00 2001 From: Andrzej Ostruszka Date: Thu, 7 Nov 2019 16:03:14 +0100 Subject: [PATCH] net/dpaa2: fix possible use of uninitialized vars @@ -6,6 +6,8 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +[ upstream commit 7bbc7dc431a66e81514219f1734ed263a3db3359 ] + This patch fixes 'maybe-uninitialized' warnings reported by compiler when using LTO. @@ -15,31 +17,17 @@ extr->masks[j].mask = cfg->extracts[i].masks[j].mask; Fixes: 16bbc98a3e63 ("bus/fslmc: update MC to 10.3.x") -Cc: stable@dpdk.org Signed-off-by: Andrzej Ostruszka --- - drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 1 + - drivers/net/dpaa2/mc/dpkg.c | 5 ++++- - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c -index 16555d7b0b..47a8bda6aa 100644 ---- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c -+++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c -@@ -51,6 +51,7 @@ rte_pmd_dpaa2_set_custom_hash(uint16_t port_id, - kg_cfg.extracts[0].type = DPKG_EXTRACT_FROM_DATA; - kg_cfg.extracts[0].extract.from_data.offset = offset; - kg_cfg.extracts[0].extract.from_data.size = size; -+ kg_cfg.extracts[0].num_of_byte_masks = 0; - kg_cfg.num_extracts = 1; - - ret = dpkg_prepare_key_cfg(&kg_cfg, p_params); + drivers/net/dpaa2/mc/dpkg.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + diff --git a/drivers/net/dpaa2/mc/dpkg.c b/drivers/net/dpaa2/mc/dpkg.c -index 80f94f40ed..1e171eedc7 100644 +index 3f98907f49..34d37bfd88 100644 --- a/drivers/net/dpaa2/mc/dpkg.c +++ b/drivers/net/dpaa2/mc/dpkg.c -@@ -63,7 +63,10 @@ dpkg_prepare_key_cfg(const struct dpkg_profile_cfg *cfg, uint8_t *key_cfg_buf) +@@ -96,7 +96,10 @@ dpkg_prepare_key_cfg(const struct dpkg_profile_cfg *cfg, uint8_t *key_cfg_buf) dpkg_set_field(extr->extract_type, EXTRACT_TYPE, cfg->extracts[i].type);