lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 11 Apr 2018 14:17:01 +0200
From:   Wolfgang Bumiller <w.bumiller@...xmox.com>
To:     David Miller <davem@...emloft.net>
Cc:     netdev@...r.kernel.org, yoshfuji@...ux-ipv6.org
Subject: Re: [PATCH linux] net: fix deadlock while clearing neighbor proxy
 table

David Miller wrote:
> From: Wolfgang Bumiller <w.bumiller@...xmox.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ