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]
Message-ID: <CAHA+R7MC4gDzKagAJ2y_2Jyb=Jx-Xkb9ns3-kqYGxH4MH8945g@mail.gmail.com>
Date:	Mon, 13 Jan 2014 11:35:23 -0800
From:	Cong Wang <cwang@...pensource.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Tom Herbert <therbert@...gle.com>, netdev <netdev@...r.kernel.org>
Subject: Re: suspicious RCU usage in net/ipv4/ip_tunnel.c:80

On Fri, Jan 10, 2014 at 5:21 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
>
> Please use following sparse ready patch, thanks :
>
> diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
> index d3929a69f008..6eda759b5c4b 100644
> --- a/net/ipv4/ip_tunnel.c
> +++ b/net/ipv4/ip_tunnel.c
> @@ -77,10 +77,11 @@ static inline void __tunnel_dst_set(struct ip_tunnel_dst *idst,
>                 dst = NULL;
>
>         spin_lock_bh(&idst->lock);
> -       old_dst = rcu_dereference(idst->dst);
> +       old_dst = rcu_dereference_protected(idst->dst,
> +                                           lockdep_is_held(&idst->lock));
>         rcu_assign_pointer(idst->dst, dst);
> -       dst_release(old_dst);
>         spin_unlock_bh(&idst->lock);
> +       dst_release(old_dst);
>  }
>
>  static inline void tunnel_dst_set(struct ip_tunnel *t, struct dst_entry *dst)
>
>

Tested-by: Cong Wang <cwang@...pensource.com>
--
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