From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id BF0C24C93 for ; Tue, 14 Aug 2018 13:13:06 +0200 (CEST) Received: from 1.general.paelzer.uk.vpn ([10.172.196.172] helo=lap.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fpXAl-0000wO-It; Tue, 14 Aug 2018 11:07:35 +0000 From: Christian Ehrhardt To: Dan Gora Cc: Ferruh Yigit , dpdk stable Date: Tue, 14 Aug 2018 13:06:47 +0200 Message-Id: <20180814110651.25277-44-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180814110651.25277-1-christian.ehrhardt@canonical.com> References: <20180814110651.25277-1-christian.ehrhardt@canonical.com> Subject: [dpdk-stable] patch 'kni: fix crash with null name' has been queued to stable release 18.05.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: Tue, 14 Aug 2018 11:13:06 -0000 Hi, FYI, your patch has been queued to stable release 18.05.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 08/16/18. So please shout if anyone has objections. Thanks. Christian Ehrhardt --- >>From e24b0d4717786d14a1897b502b2e893c2842acdf Mon Sep 17 00:00:00 2001 From: Dan Gora Date: Thu, 28 Jun 2018 15:58:38 -0700 Subject: [PATCH] kni: fix crash with null name [ upstream commit e716b639856cc4baa46bc6d5bc63bcc1d6bd9cf9 ] Fix a segmentation fault which occurs when the kni_autotest is run in the 'test' application. This segmenation fault occurs when rte_kni_get() is called with a NULL value for 'name'. Fixes: 0c6bc8ef70ba ("kni: memzone pool for alloc and release") Signed-off-by: Dan Gora Acked-by: Ferruh Yigit --- lib/librte_kni/rte_kni.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c index 8a8f6c1cc..65f6a2b03 100644 --- a/lib/librte_kni/rte_kni.c +++ b/lib/librte_kni/rte_kni.c @@ -715,6 +715,9 @@ rte_kni_get(const char *name) struct rte_kni_memzone_slot *it; struct rte_kni *kni; + if (name == NULL || name[0] == '\0') + return NULL; + /* Note: could be improved perf-wise if necessary */ for (i = 0; i < kni_memzone_pool.max_ifaces; i++) { it = &kni_memzone_pool.slots[i]; -- 2.17.1