From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH linux] net: fix deadlock while clearing neighbor proxy table Date: Tue, 10 Apr 2018 11:02:29 -0400 (EDT) Message-ID: <20180410.110229.1597289057689247263.davem@davemloft.net> References: <20180410091514.28704-1-w.bumiller@proxmox.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, yoshfuji@linux-ipv6.org To: w.bumiller@proxmox.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:53410 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754385AbeDJPCb (ORCPT ); Tue, 10 Apr 2018 11:02:31 -0400 In-Reply-To: <20180410091514.28704-1-w.bumiller@proxmox.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Wolfgang Bumiller Date: Tue, 10 Apr 2018 11:15:14 +0200 > diff --git a/net/core/neighbour.c b/net/core/neighbour.c > index 7b7a14abba28..601df647588c 100644 > --- a/net/core/neighbour.c > +++ b/net/core/neighbour.c > @@ -292,7 +292,6 @@ int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev) > write_lock_bh(&tbl->lock); > neigh_flush_dev(tbl, dev); > pneigh_ifdown(tbl, dev); > - write_unlock_bh(&tbl->lock); If we are going to fix it this way, we need to annotate the code here in some way so that future readers understand why the tbl->lock is not being released here. One way is to add a comment. Another way is to rename pneigh_ifdown() to "pneigh_ifdown_and_unlock()".