From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Machata Subject: Re: [PATCH net v2 2/4] vxlan: Fix error path in __vxlan_dev_create() Date: Mon, 17 Dec 2018 23:41:05 +0000 Message-ID: References: <9a0a099c4db3666011a75bf23ae961bf9b51c4ed.1545068986.git.petrm@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: netdev , David Miller , Ido Schimmel To: Roopa Prabhu Return-path: Received: from mail-eopbgr30054.outbound.protection.outlook.com ([40.107.3.54]:34528 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726260AbeLQXlJ (ORCPT ); Mon, 17 Dec 2018 18:41:09 -0500 In-Reply-To: (Roopa Prabhu's message of "Mon, 17 Dec 2018 12:07:24 -0800") Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: Roopa Prabhu writes: >> @@ -3297,9 +3298,15 @@ static int __vxlan_dev_create(struct net *net, st= ruct net_device *dev, >> >> list_add(&vxlan->next, &vn->vxlan_list); >> return 0; >> + >> errout: >> + /* unregister_netdevice() destroys the default FDB entry with de= letion >> + * notification. But the addition notification was not sent yet,= so >> + * destroy the entry by hand here. >> + */ >> if (f) >> vxlan_fdb_destroy(vxlan, f, false); >> + unregister_netdevice(dev); > > if (unregister_netdev_onerr) > unregister_netdevice All right, I'll send v3 tomorrow.