From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id AD0AD1B873 for ; Tue, 15 May 2018 15:49:18 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id i14-v6so232218wre.2 for ; Tue, 15 May 2018 06:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3ImSZk/OlXpQs0MrhjZzsKjimWyP+QUS9KIs5O+RxRM=; b=HX/VH5fvgGZ6mmjBVIOyI1UZqX12J/U1Mzvqnd+muL3flxp1vvV5dHSPcMyi0APkZi Gc4MP7p6/nLMM+4s9XTrx2x6+zkzYK82Py9FVmLMLgah6p9XVgSJbJQ0+9yxRwDeTct3 4VcbbCWMZevdeCOexx/sbRVZoQIYrWiqaUtl6OWel+oRz4ZXbNkj+2iB2ni/ArpmKMTo JydnH0YWCXkJo8xq0tU0U1t0TNsvAKEYgDoIGP9p06yNItdgqlkXu7q3RCXnIBlX8FRU PVFy1q3iayJDC1nvwnB/FcSyFKzwqPBUdjmBnnr/uYAXv/oRIax0DO1fa/x0GsRncQr2 +8ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3ImSZk/OlXpQs0MrhjZzsKjimWyP+QUS9KIs5O+RxRM=; b=ecfZof7HZfXAXtsFNEW4Rh8E0TC0T5tBGQTXm6A7jtIP/UvGVaGs/2tr5KupFGxxp6 QztGhdoi4BABoWTwn5xXLn3lDQaEKtj5tThg8/RCfxfENQyRtYSqYzpSOYqSW+c6gVwo ViX5e7Z4lNRjMGUVWUtQF1BeVFbxIFevSNfiBYmO4oWacMFWxGm7K/aiy608rKOkNlDP mOS7UPgUxygB4t+1jFe7fqiKnQLZe5sLTUK9Zb8sEOjspBPv1YudRmePsncNsVdm2RZG h4GMqHnheV5TLzqtX8O2SvbQdLVZEYE6oviZ1DpwaABvfhIL5zJ+i7uh9SCBQv1KDjCb Td/w== X-Gm-Message-State: ALKqPwcEPimXwt0tJAKhQlHT+R3QwdrcCLlPqJrX+fiaE/mxdrVYOACt QomoeMgbFtJzgJo+t5YpBq2jGUCLSHU= X-Google-Smtp-Source: AB8JxZqiDr7E3u7XblENxJ/iFQQqCSTjkmQBGBAf885UYVA1WGwur2hV/QsA1CibY9dFOrkV5Rk9Ng== X-Received: by 2002:adf:de87:: with SMTP id w7-v6mr10957411wrl.37.1526392158435; Tue, 15 May 2018 06:49:18 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id m134-v6sm701675wmg.13.2018.05.15.06.49.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 06:49:17 -0700 (PDT) From: luca.boccassi@gmail.com To: Raslan Darawsheh Cc: Matan Azrad , Gaetan Rivet , dpdk stable Date: Tue, 15 May 2018 14:47:09 +0100 Message-Id: <20180515134731.9337-58-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180515134731.9337-1-luca.boccassi@gmail.com> References: <20180503110612.12146-2-luca.boccassi@gmail.com> <20180515134731.9337-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/failsafe: fix probe cleanup' has been queued to stable release 18.02.2 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, 15 May 2018 13:49:18 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 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/16/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From f811ccd32d16ef119bbc9d04e8861e6dd72552fc 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 c499bfb98..5b177c7a1 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -224,7 +224,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 { @@ -258,6 +258,8 @@ fs_eth_dev_create(struct rte_vdev_device *vdev) .type = RTE_INTR_HANDLE_EXT, }; return 0; +cancel_alarm: + failsafe_hotplug_alarm_cancel(dev); free_args: failsafe_args_free(dev); free_subs: -- 2.14.2