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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1370405222.24311.231.camel@edumazet-glaptop>
Date:	Tue, 04 Jun 2013 21:07:02 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Cong Wang <amwang@...hat.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [Patch net-next v1 1/3] igmp: avoid taking RTNL for
 ip_mc_find_dev()

On Wed, 2013-06-05 at 11:33 +0800, Cong Wang wrote:
> From: Cong Wang <amwang@...hat.com>
> 
> RCU is enough to protect ip_mc_find_dev().
> 
> Cc: "David S. Miller" <davem@...emloft.net>
> Signed-off-by: Cong Wang <amwang@...hat.com>
> ---
>  net/ipv4/igmp.c |   48 ++++++++++++++++++------------------------------
>  1 files changed, 18 insertions(+), 30 deletions(-)
> 
> diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
> index 450f625..d3218c0 100644
> --- a/net/ipv4/igmp.c
> +++ b/net/ipv4/igmp.c
> @@ -1433,7 +1433,6 @@ void ip_mc_destroy_dev(struct in_device *in_dev)
>  	}
>  }
>  
> -/* RTNL is locked */
>  static struct in_device *ip_mc_find_dev(struct net *net, struct ip_mreqn *imr)
>  {
>  	struct net_device *dev = NULL;
> @@ -1459,8 +1458,10 @@ static struct in_device *ip_mc_find_dev(struct net *net, struct ip_mreqn *imr)
>  		}
>  	}
>  	if (dev) {
> +		rcu_read_lock();
>  		imr->imr_ifindex = dev->ifindex;
> -		idev = __in_dev_get_rtnl(dev);
> +		idev = __in_dev_get_rcu(dev);
> +		rcu_read_unlock();
>  	}
>  	return idev;
>  }


You must be kidding.

This is obviously wrong.



--
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