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] [day] [month] [year] [list]
Date:	Fri, 13 Dec 2013 09:53:52 +0200 (EET)
From:	Julian Anastasov <ja@....bg>
To:	Tom Herbert <therbert@...gle.com>
cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] net: Cache route in IP tunnels


	Hello,

On Wed, 11 Dec 2013, Tom Herbert wrote:

> +static inline void
> +tunnel_dst_set(struct ip_tunnel *t, struct dst_entry *dst)
> +{
> +	struct dst_entry *old_dst;
> +
> +	spin_lock(&t->dst_lock);
> +	old_dst = rcu_dereference_raw(t->dst_cache);
> +	rcu_assign_pointer(t->dst_cache, dst);
> +	dst_release(old_dst);
> +	spin_unlock(&t->dst_lock);

	It seems the func is also called by ip_tunnel_update(),
do we need _bh locks in such case?

> +}
> +
> +static inline void
> +tunnel_dst_reset(struct ip_tunnel *t)
> +{
> +	tunnel_dst_set(t, NULL);
> +}
> +

...

> @@ -696,6 +750,7 @@ static void ip_tunnel_update(struct ip_tunnel_net *itn,
>  		if (set_mtu)
>  			dev->mtu = mtu;
>  	}
> +	tunnel_dst_reset(t);
>  	netdev_state_change(dev);
>  }

Regards

--
Julian Anastasov <ja@....bg>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ