Messages in this thread Patch in this message | | | Date | Wed, 21 Mar 2012 14:15:39 -0700 | From | Greg KH <> | Subject | [ 7/9] ipv6: Dont dev_hold(dev) in ip6_mc_find_dev_rcu. |
| |
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: RongQing.Li <roy.qing.li@gmail.com>
[ Upstream commit c577923756b7fe9071f28a76b66b83b306d1d001 ]
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.
[ bug introduced in 96b52e61be1 (ipv6: mcast: RCU conversions) ]
Signed-off-by: RongQing.Li <roy.qing.li@gmail.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- net/ipv6/mcast.c | 1 - 1 file changed, 1 deletion(-)
--- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c @@ -257,7 +257,6 @@ static struct inet6_dev *ip6_mc_find_dev if (rt) { dev = rt->rt6i_dev; - dev_hold(dev); dst_release(&rt->dst); } } else
| |