From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id 2F0E61B213 for ; Wed, 9 May 2018 13:46:34 +0200 (CEST) Received: by mail-wr0-f196.google.com with SMTP id h5-v6so11436769wrm.4 for ; Wed, 09 May 2018 04:46:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Fz/PvPME95XJ8fEaC9O5kGsE14fKV7yWR94wcW+5g5E=; b=RDwq6J+yBlGGEO8x36txPkZbuelPjB36g7f+8OGWelkNO/h8R3Mcul/z9jCLHSJxN+ c7xrU8UT+DtypfOWTnUqadQ8toV+BRzrS7KOBGeK388r42LacnGvAIPzprGB6KaLAqMv 8sgzN+surmChf+DQIAel74MHr13cef/c4UFod4K6PaFKK0mZnYB+bUutMijwE5S8T8Yt jYpQuSk+erks2ZnHEeZCqWED1Jx53EzWLwFwmZ+VPrDu5Jgm8gn7qSLw+d5jQB9/WUcO UtKDnj3nwqciFQPzDbjvLiJ9OjRtLF7vY/Ckc8diF54qvs2qkfdH/+ZN8ywNzb9JodLs WTaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Fz/PvPME95XJ8fEaC9O5kGsE14fKV7yWR94wcW+5g5E=; b=srkDgdw2PZe+O6zwLx6VWNeITuhChoR056SqtQ7Dl1ZdGO7pKEF9fkdP5YoCAqry2g ga7ej1IgwMYgOao/Omf1YRIw63TNxnYakYoSPrIJmR7YCLelVheyW6+aID+gZtdDdcsf ZNPV7hri8PagJafMQwROEAOn5UpyUZX090xvEbCnoyA9Znf4qOkdxiVohz5g9tRy5KG/ IGV5x8IOmMxCZI71gkdZ3671pw75kh+gIzlYd/D0MkoUMzIMQaV6e5MFgvGbqTAgUZv6 z34FUv+h+Fy4plHevcJZW7GJnV7sceJ3dxDfMZFPhCSWYO1bpF3IeBDJUHeRh2sTgu7s r01w== X-Gm-Message-State: ALKqPwfvgmyM+7B7tM7MqGM/JREq7xJOuz6zfVuMR5Eytq9YhVZZRrLi B9rJbhhEmQXN6pJc/RUequeelQ== X-Google-Smtp-Source: AB8JxZqISY1tLZ1L1VJjRAXxSjcG8zsOPMqyfkfhIduKd8WfvtwyPeCa7wspG3PCTEYO6IwJtvy61g== X-Received: by 2002:adf:a219:: with SMTP id p25-v6mr5339737wra.19.1525866393566; Wed, 09 May 2018 04:46:33 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id z18-v6sm38253792wrc.36.2018.05.09.04.46.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 May 2018 04:46:32 -0700 (PDT) Date: Wed, 9 May 2018 13:46:17 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Raslan Darawsheh Cc: dev@dpdk.org, matan@mellanox.com, thomas@monjalon.net, ophirmu@mellanox.com Message-ID: <20180509114617.drhsvki5ep6r2xxv@bidouze.vm.6wind.com> References: <1525695435-14917-1-git-send-email-rasland@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1525695435-14917-1-git-send-email-rasland@mellanox.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH] net/failsafe: fix starting failsafe with invalid MAC X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 11:46:34 -0000 Hello Raslan, Thank you for fixing this bug. On Mon, May 07, 2018 at 03:17:15PM +0300, Raslan Darawsheh wrote: > When starting failsafe with mac option, and giving it an invalid MAC. It > will cause a segmentation fault due to the hotplug_alarm installed on an > invalid subdev. > > Fixes: a46f8d58 ("net/failsafe: add fail-safe PMD") Only issue I have with this patch is that it should fix instead the commit Fixes: ebea83f8 ("net/failsafe: add plug-in support") Which introduced the alarm_install routine. > Signed-off-by: Raslan Darawsheh Otherwise: 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 5e7a8ba..3a747c2 100644 > --- a/drivers/net/failsafe/failsafe.c > +++ b/drivers/net/failsafe/failsafe.c > @@ -226,7 +226,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 { > @@ -260,6 +260,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.7.4 > Thanks, -- Gaëtan Rivet 6WIND