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.


Reply via email to