All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org,
	alan@lxorguk.ukuu.org.uk, "RongQing.Li" <roy.qing.li@gmail.com>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: [ 7/9] ipv6: Dont dev_hold(dev) in ip6_mc_find_dev_rcu.
Date: Wed, 21 Mar 2012 14:15:39 -0700	[thread overview]
Message-ID: <20120321211533.367387452@linuxfoundation.org> (raw)
In-Reply-To: <20120321211539.GA28899@kroah.com>

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



  parent reply	other threads:[~2012-03-21 21:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 21:15 [ 0/9] 3.2.13-stable review Greg KH
2012-03-21 21:15 ` [ 1/9] nilfs2: fix NULL pointer dereference in nilfs_load_super_block() Greg KH
2012-03-21 21:15 ` [ 2/9] afs: Read of file returns EBADMSG Greg KH
2012-03-21 21:15 ` [ 3/9] afs: Remote abort can cause BUG in rxrpc code Greg KH
2012-03-21 21:15 ` [ 4/9] perf tools: Incorrect use of snprintf results in SEGV Greg KH
2012-03-21 21:15 ` [ 5/9] perf tools: Use scnprintf where applicable Greg KH
2012-03-21 21:15 ` [ 6/9] tcp: fix syncookie regression Greg KH
2012-03-21 21:15 ` Greg KH [this message]
2012-03-21 21:15 ` [ 8/9] iwl3945: fix possible il->txq NULL pointer dereference in delayed works Greg KH
2012-03-21 21:15 ` [ 9/9] powerpc/pmac: Fix SMP kernels on pre-core99 UP machines Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120321211533.367387452@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roy.qing.li@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.