From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, yoshfuji@linux-ipv6.org
Subject: Re: [PATCH linux] net: fix deadlock while clearing neighbor proxy table
Date: Wed, 11 Apr 2018 14:17:01 +0200 [thread overview]
Message-ID: <5acdfcbd910c6_a7b2ac7838cb0d497@olga.notmuch> (raw)
In-Reply-To: <20180410.110229.1597289057689247263.davem@davemloft.net>
David Miller wrote:
> From: Wolfgang Bumiller <w.bumiller@proxmox.com>
> 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.
A better way would of course be nice, too, but I find it hard to find
one given how "far away" the IGMP and then output code are from this
point.
> One way is to add a comment.
>
> Another way is to rename pneigh_ifdown() to "pneigh_ifdown_and_unlock()".
Sure, I can send a v2 with whichever is preferred - personally I prefer
the rename as it'll be visible at both the calling & implementation
side.
next prev parent reply other threads:[~2018-04-11 12:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-10 9:15 [PATCH linux] net: fix deadlock while clearing neighbor proxy table Wolfgang Bumiller
2018-04-10 15:02 ` David Miller
2018-04-11 12:17 ` Wolfgang Bumiller [this message]
2018-04-11 14:38 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5acdfcbd910c6_a7b2ac7838cb0d497@olga.notmuch \
--to=w.bumiller@proxmox.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).