From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 77ED48DB5 for ; Sun, 20 May 2018 15:09:17 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 274C521D4F; Sun, 20 May 2018 09:09:17 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 20 May 2018 09:09:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=0G1poq04Ti8/XC0Ay 0Oo0tFI/B6MJP4/p8GjeHD/Ks8=; b=onLzVqCDBdPC5k9ZAdTtSyHF0HoXLiWkF GKwZnMPxtbAqOCubrP4pwKIrKjPlDbfvr5C6V9E8jtz+41rL1WsuZUQsXcN2V0Cv h16siMAfiYkZCny3m9LYXmOCGOpsfvTXZwUrcr/oMJ9zOEGq2sBT2Q+qRUDJAhDJ hL3EeYHLMezcSvZowNtm6X99ZP92/dPsOuJLCuxObVC/HBHtP06Zem6zjSIXyjEF 4JobfAj6//2aqC1YjjH/MRO7tDXXMCXPq2ObBXyRaI3Xbw2+RkvQEKuZg/3HmCdY MP/EeVVbyQv+/vLtxzdgM120GH9x3zkxOOHVd0H6IqGVncvGfXuiw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=0G1poq04Ti8/XC0Ay0Oo0tFI/B6MJP4/p8GjeHD/Ks8=; b=GmYnjCd7 qTByUL0HQvpgEBJy6KBW36+GgoSNtNOfsMDsccz2LUrRwDc3KV5zSUSkPGu2SNqy oeT+B57KgUsw/IF1EMOKl2m0GrHYerSN7gTvnihtLp2gOvII9YF08qQl4Q8NhJoF 5OU9o3Bz/L+mb4S6GLbO1uipFcSbn6MlQkEzzxFrBTDWEy3zHxaHh9PzHYrDNT0M 6LwFWy2jsp2WDcXGltBqgypqxOJPGzvfUkgwhYxmvXZ5gIe02RixI3SWyLLTwLQe tKN8IXvGmUSUNnZ47p5fFUPocDEjyULNtsR4p2ESQsiQttdvqepP/LZXe0QBZT7/ cABBl2SqcDWcNw== X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from yuanhanliu-NB0.tencent.com (unknown [223.74.148.80]) by mail.messagingengine.com (Postfix) with ESMTPA id 21DDB1025C; Sun, 20 May 2018 09:09:14 -0400 (EDT) From: Yuanhan Liu To: Raslan Darawsheh Cc: Matan Azrad , Gaetan Rivet , dpdk stable Date: Sun, 20 May 2018 21:02:38 +0800 Message-Id: <20180520130246.16287-22-yliu@fridaylinux.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180520130246.16287-1-yliu@fridaylinux.org> References: <20180520130246.16287-1-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/failsafe: fix probe cleanup' has been queued to LTS release 17.11.3 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: Sun, 20 May 2018 13:09:17 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/27/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 85865d936ac500e585bc9e1c2225a736dd1fbb85 Mon Sep 17 00:00:00 2001 From: Raslan Darawsheh Date: Wed, 9 May 2018 18:57:39 +0300 Subject: [PATCH] net/failsafe: fix probe cleanup [ upstream commit 95e7a72f9decd1db38dfb754b485dd4ac6859def ] The hot-plug alarm mechanism is responsible to practically execute both plug in and out operations. It periodically tries to detect missed sub-devices to be reconfigured and clean the resources of the removed sub-devices. The hot-plug alarm is started by the failsafe probe function, and it's wrongly not stopped if failsafe instance got an error. for example when starting failsafe with a MAC option, and giving it an invalid MAC address this will lead to a NULL pointer for the dev private field. Then when the hotplug alarm is called it will try to access this pointer, which will lead to a segmentation fault. Uninstall the hot-plug alarm in case of error in probe function. Fixes: ebea83f8 ("net/failsafe: add plug-in support") Signed-off-by: Raslan Darawsheh Acked-by: Matan Azrad Acked-by: Gaetan Rivet --- drivers/net/failsafe/failsafe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c index 8336510f0..41b4cb0b0 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -210,7 +210,7 @@ fs_eth_dev_create(struct rte_vdev_device *vdev) mac); if (ret) { ERROR("Failed to set default MAC address"); - goto free_args; + goto cancel_alarm; } } } else { @@ -240,6 +240,8 @@ fs_eth_dev_create(struct rte_vdev_device *vdev) mac->addr_bytes[4], mac->addr_bytes[5]); dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC; return 0; +cancel_alarm: + failsafe_hotplug_alarm_cancel(dev); free_args: failsafe_args_free(dev); free_subs: -- 2.11.0