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 60ACD1B517 for ; Fri, 30 Nov 2018 00:16:06 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Nov 2018 01:21:56 +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 wATNCW93032075; Fri, 30 Nov 2018 01:16:01 +0200 From: Yongseok Koh To: Thomas Monjalon Cc: dpdk stable Date: Thu, 29 Nov 2018 15:11:57 -0800 Message-Id: <20181129231202.30436-123-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181129231202.30436-1-yskoh@mellanox.com> References: <20181129231202.30436-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'kni: 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: Thu, 29 Nov 2018 23:16:06 -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 12/01/18. 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 1fd94133e5aa10aade539d72046e6911c2b8d190 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Fri, 16 Nov 2018 17:58:51 +0100 Subject: [PATCH] kni: fix possible uninitialized variable [ upstream commit a17842c1421c1b26f9deed4f6684abdba06e7a56 ] This error can be raised: lib/librte_kni/rte_kni.c:531:15: error: 'req' may be used uninitialized in this function It should not happen because kni_fifo_get() would return 0 if req is not initialized, so the function would return before using req. But GCC complains about it in -O1 optimization, and a NULL initialization is harmless here. Fixes: 3fc5ca2f6352 ("kni: initial import") Signed-off-by: Thomas Monjalon --- lib/librte_kni/rte_kni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c index 4b45d1a01..fbd250da6 100644 --- a/lib/librte_kni/rte_kni.c +++ b/lib/librte_kni/rte_kni.c @@ -532,7 +532,7 @@ int rte_kni_handle_request(struct rte_kni *kni) { unsigned ret; - struct rte_kni_request *req; + struct rte_kni_request *req = NULL; if (kni == NULL) return -1; -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 15:01:50.575441648 -0800 +++ 0123-kni-fix-possible-uninitialized-variable.patch 2018-11-29 15:01:45.321957000 -0800 @@ -1,8 +1,10 @@ -From a17842c1421c1b26f9deed4f6684abdba06e7a56 Mon Sep 17 00:00:00 2001 +From 1fd94133e5aa10aade539d72046e6911c2b8d190 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Fri, 16 Nov 2018 17:58:51 +0100 Subject: [PATCH] kni: fix possible uninitialized variable +[ upstream commit a17842c1421c1b26f9deed4f6684abdba06e7a56 ] + This error can be raised: lib/librte_kni/rte_kni.c:531:15: error: 'req' may be used uninitialized in this function @@ -13,7 +15,6 @@ and a NULL initialization is harmless here. Fixes: 3fc5ca2f6352 ("kni: initial import") -Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon --- @@ -21,10 +22,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c -index c9726d4f8..73aeccccf 100644 +index 4b45d1a01..fbd250da6 100644 --- a/lib/librte_kni/rte_kni.c +++ b/lib/librte_kni/rte_kni.c -@@ -483,7 +483,7 @@ int +@@ -532,7 +532,7 @@ int rte_kni_handle_request(struct rte_kni *kni) { unsigned ret;