From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id EFB921B4AA for ; Thu, 29 Nov 2018 14:24:04 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 632BD3082B4F; Thu, 29 Nov 2018 13:24:04 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-117-230.ams2.redhat.com [10.36.117.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2E6411001F50; Thu, 29 Nov 2018 13:24:03 +0000 (UTC) From: Kevin Traynor To: Thomas Monjalon Cc: dpdk stable Date: Thu, 29 Nov 2018 13:21:11 +0000 Message-Id: <20181129132128.7609-71-ktraynor@redhat.com> In-Reply-To: <20181129132128.7609-1-ktraynor@redhat.com> References: <20181129132128.7609-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Thu, 29 Nov 2018 13:24:04 +0000 (UTC) Subject: [dpdk-stable] patch 'kni: fix possible uninitialized variable' has been queued to stable release 18.08.1 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 13:24:05 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 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/08/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. Kevin Traynor --- >>From 9f20530c73315d3775781445fffa462b51156769 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 65f6a2b03..482d3662e 100644 --- a/lib/librte_kni/rte_kni.c +++ b/lib/librte_kni/rte_kni.c @@ -551,5 +551,5 @@ rte_kni_handle_request(struct rte_kni *kni) { unsigned ret; - struct rte_kni_request *req; + struct rte_kni_request *req = NULL; if (kni == NULL) -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 13:11:36.804731467 +0000 +++ 0070-kni-fix-possible-uninitialized-variable.patch 2018-11-29 13:11:34.000000000 +0000 @@ -1,8 +1,10 @@ -From a17842c1421c1b26f9deed4f6684abdba06e7a56 Mon Sep 17 00:00:00 2001 +From 9f20530c73315d3775781445fffa462b51156769 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 65f6a2b03..482d3662e 100644 --- a/lib/librte_kni/rte_kni.c +++ b/lib/librte_kni/rte_kni.c -@@ -484,5 +484,5 @@ rte_kni_handle_request(struct rte_kni *kni) +@@ -551,5 +551,5 @@ rte_kni_handle_request(struct rte_kni *kni) { unsigned ret; - struct rte_kni_request *req;