From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id C3D301B949 for ; Fri, 11 Jan 2019 11:32:23 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 11 Jan 2019 12:32:19 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x0BAVjch018586; Fri, 11 Jan 2019 12:32:18 +0200 From: Yongseok Koh To: Thomas Monjalon Cc: dpdk stable Date: Fri, 11 Jan 2019 02:31:42 -0800 Message-Id: <20190111103142.21088-19-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190111103142.21088-1-yskoh@mellanox.com> References: <20190111103142.21088-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx4: fix possible uninitialized variable' has been queued to LTS release 17.11.5 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: , X-List-Received-Date: Fri, 11 Jan 2019 10:32:24 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/13/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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Yongseok --- >>From 2798999e0889d6762b4d79450028a6369ce52f22 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Fri, 16 Nov 2018 17:58:52 +0100 Subject: [PATCH] net/mlx4: fix possible uninitialized variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 554f06d10b1c646f20d7011a30b26fb43507d596 ] When compiling with gcc -O1, this error appears: drivers/net/mlx4/mlx4_ethdev.c: In function ‘mlx4_rxmode_toggle’: rte_log.h:321:3: error: ‘mode’ may be used uninitialized in this function The function mlx4_rxmode_toggle is never called with a value which is not in the switch block, but GCC complains about it with -O1. So the default case is "fixed" by setting string "undefined". Fixes: eacaac7bae36 ("net/mlx4: restore promisc and allmulti support") Signed-off-by: Thomas Monjalon --- drivers/net/mlx4/mlx4_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx4/mlx4_ethdev.c b/drivers/net/mlx4/mlx4_ethdev.c index 89f552c87..170e2cb1b 100644 --- a/drivers/net/mlx4/mlx4_ethdev.c +++ b/drivers/net/mlx4/mlx4_ethdev.c @@ -386,6 +386,8 @@ mlx4_rxmode_toggle(struct rte_eth_dev *dev, enum rxmode_toggle toggle) mode = "all multicast"; dev->data->all_multicast = toggle & 1; break; + default: + mode = "undefined"; } if (!mlx4_flow_sync(priv, &error)) return; -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-01-11 02:29:11.933698072 -0800 +++ 0019-net-mlx4-fix-possible-uninitialized-variable.patch 2019-01-11 02:29:10.839972000 -0800 @@ -1,4 +1,4 @@ -From 554f06d10b1c646f20d7011a30b26fb43507d596 Mon Sep 17 00:00:00 2001 +From 2798999e0889d6762b4d79450028a6369ce52f22 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Fri, 16 Nov 2018 17:58:52 +0100 Subject: [PATCH] net/mlx4: fix possible uninitialized variable @@ -6,6 +6,8 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +[ upstream commit 554f06d10b1c646f20d7011a30b26fb43507d596 ] + When compiling with gcc -O1, this error appears: drivers/net/mlx4/mlx4_ethdev.c: In function ‘mlx4_rxmode_toggle’: rte_log.h:321:3: error: @@ -16,7 +18,6 @@ So the default case is "fixed" by setting string "undefined". Fixes: eacaac7bae36 ("net/mlx4: restore promisc and allmulti support") -Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon --- @@ -24,10 +25,10 @@ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx4/mlx4_ethdev.c b/drivers/net/mlx4/mlx4_ethdev.c -index 30deb3ef0..195a1b6df 100644 +index 89f552c87..170e2cb1b 100644 --- a/drivers/net/mlx4/mlx4_ethdev.c +++ b/drivers/net/mlx4/mlx4_ethdev.c -@@ -360,6 +360,8 @@ mlx4_rxmode_toggle(struct rte_eth_dev *dev, enum rxmode_toggle toggle) +@@ -386,6 +386,8 @@ mlx4_rxmode_toggle(struct rte_eth_dev *dev, enum rxmode_toggle toggle) mode = "all multicast"; dev->data->all_multicast = toggle & 1; break;