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:	Thu, 24 Mar 2016 13:35:40 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Cong Wang <xiyou.wangcong@...il.com>
Cc:	netdev@...r.kernel.org, weiwan@...gle.com,
	Steffen Klassert <steffen.klassert@...unet.com>,
	Martin KaFai Lau <kafai@...com>,
	Hannes Frederic Sowa <hannes@...essinduktion.org>,
	Julian Anastasov <ja@....bg>
Subject: Re: [RFT Patch net 1/2] ipv6: invalidate the socket cached route on
 pmtu events if possible

On Thu, 2016-03-24 at 12:25 -0700, Cong Wang wrote:

>  void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu)
>  {
> -	ip6_update_pmtu(skb, sock_net(sk), mtu,
> -			sk->sk_bound_dev_if, sk->sk_mark);
> +	const struct ipv6hdr *iph = (struct ipv6hdr *)skb->data;
> +	struct net *net = sock_net(sk);
> +	struct dst_entry *ndst, *dst;
> +	struct flowi6 fl6;
> +	bool new = false;
> +
> +	memset(&fl6, 0, sizeof(fl6));
> +
> +	bh_lock_sock(sk);
> +


This is not clear why you need to acquire socket lock.

sk_dst_cache is protected by an atomic operation.

udp for example calls ip6_dst_store() without socket being locked.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ