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: <1331907353.2420.1.camel@edumazet-laptop>
Date:	Fri, 16 Mar 2012 07:15:53 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	roy.qing.li@...il.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu.

Le vendredi 16 mars 2012 à 16:54 +0800, roy.qing.li@...il.com a écrit :
> From: RongQing.Li <roy.qing.li@...il.com>
> 
> ip6_mc_find_dev_rcu() is called with rcu_read_lock(), so don't
> need to dev_hold().
> With dev_hold(), not corresponding dev_put(), will lead to leak.
> 
> Signed-off-by: RongQing.Li <roy.qing.li@...il.com>
> ---
>  net/ipv6/mcast.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
> index b853f06..16c33e3 100644
> --- a/net/ipv6/mcast.c
> +++ b/net/ipv6/mcast.c
> @@ -257,7 +257,6 @@ static struct inet6_dev *ip6_mc_find_dev_rcu(struct net *net,
>  
>  		if (rt) {
>  			dev = rt->dst.dev;
> -			dev_hold(dev);
>  			dst_release(&rt->dst);
>  		}
>  	} else

Nice catch, bug introduced in 96b52e61be1 (ipv6: mcast: RCU conversions)

Acked-by: Eric Dumazet <eric.dumazet@...il.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