aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorRongQing.Li <roy.qing.li@gmail.com>2012-03-15 18:54:14 -0400
committerLuis Henriques <luis.henriques@canonical.com>2012-03-26 05:27:08 -0400
commitbd494c97967eabc2bfd8188101f98be5bbce4492 (patch)
tree8e4fa719048acbdcc90e0ac5ebcdb699b82f6990 /net/ipv6
parent37126f6112310d812953a248750c2a49a916ab8c (diff)
ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu.
BugLink: http://bugs.launchpad.net/bugs/963823 [ 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> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/mcast.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index ee7839f4d6e..225736697df 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,
257 257
258 if (rt) { 258 if (rt) {
259 dev = rt->rt6i_dev; 259 dev = rt->rt6i_dev;
260 dev_hold(dev);
261 dst_release(&rt->dst); 260 dst_release(&rt->dst);
262 } 261 }
263 } else 262 } else