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:   Mon, 28 May 2018 10:42:53 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Petr Machata <petrm@...lanox.com>
Cc:     bridge@...ts.linux-foundation.org, netdev@...r.kernel.org,
        davem@...emloft.net
Subject: Re: [PATCH net-next] net: bridge: Lock before br_fdb_find()

On Mon, 28 May 2018 17:44:16 +0200
Petr Machata <petrm@...lanox.com> wrote:

> Callers of br_fdb_find() need to hold the hash lock, which
> br_fdb_find_port() doesn't do. Add the missing lock/unlock
> pair.
> 
> Signed-off-by: Petr Machata <petrm@...lanox.com>
> ---
>  net/bridge/br_fdb.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
> index b19e310..3f5691a 100644
> --- a/net/bridge/br_fdb.c
> +++ b/net/bridge/br_fdb.c
> @@ -135,9 +135,11 @@ struct net_device *br_fdb_find_port(const struct net_device *br_dev,
>  		return NULL;
>  
>  	br = netdev_priv(br_dev);
> +	spin_lock_bh(&br->hash_lock);
>  	f = br_fdb_find(br, addr, vid);
>  	if (f && f->dst)
>  		dev = f->dst->dev;
> +	spin_unlock_bh(&br->hash_lock);
>  
>  	return dev;
>  }

Sigh. when did br_fdb_find start needing hash_lock?
What is the point of RCU then?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ