netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	"David S. Miller" <davem@davemloft.net>,
	Cong Wang <xiyou.wangcong@gmail.com>
Subject: [Patch net-next v2 7/8] ipv6: update the comment in mcast.c
Date: Thu, 11 Sep 2014 15:35:15 -0700	[thread overview]
Message-ID: <1410474916-21873-8-git-send-email-xiyou.wangcong@gmail.com> (raw)
In-Reply-To: <1410474916-21873-1-git-send-email-xiyou.wangcong@gmail.com>

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
 net/ipv6/mcast.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 4fb761d..d64e263 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -556,9 +556,8 @@ int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
 	}
 
 	err = -EADDRNOTAVAIL;
-	/*
-	 * changes to the ipv6_mc_list require the socket lock and
-	 * a read lock on ip6_sk_mc_lock. We have the socket lock,
+	/* changes to the ipv6_mc_list require the socket lock and
+	 * rtnl lock. We have the socket lock and rcu read lock,
 	 * so reading the list is safe.
 	 */
 
@@ -582,9 +581,8 @@ int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
 	    copy_to_user(optval, gsf, GROUP_FILTER_SIZE(0))) {
 		return -EFAULT;
 	}
-	/* changes to psl require the socket lock, a read lock on
-	 * on ipv6_sk_mc_lock and a write lock on pmc->sflock. We
-	 * have the socket lock, so reading here is safe.
+	/* changes to psl require the socket lock, and a write lock
+	 * on pmc->sflock. We have the socket lock so reading here is safe.
 	 */
 	for (i = 0; i < copycount; i++) {
 		struct sockaddr_in6 *psin6;
@@ -2350,7 +2348,7 @@ static int ip6_mc_leave_src(struct sock *sk, struct ipv6_mc_socklist *iml,
 {
 	int err;
 
-	/* callers have the socket lock and a write lock on ipv6_sk_mc_lock,
+	/* callers have the socket lock and rtnl lock
 	 * so no other readers or writers of iml or its sflist
 	 */
 	if (!iml->sflist) {
-- 
1.8.3.1

  parent reply	other threads:[~2014-09-11 22:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11 22:35 [Patch net-next v2 0/8] ipv6: clean up locking code in anycast and mcast Cong Wang
2014-09-11 22:35 ` [Patch net-next v2 1/8] ipv6: drop useless rcu_read_lock() in anycast Cong Wang
2014-09-11 22:35 ` [Patch net-next v2 2/8] ipv6: remove ipv6_sk_ac_lock Cong Wang
2014-09-11 22:35 ` [Patch net-next v2 3/8] ipv6: clean up ipv6_dev_ac_inc() Cong Wang
2014-09-11 22:35 ` [Patch net-next v2 4/8] ipv6: refactor __ipv6_dev_ac_inc() Cong Wang
2014-09-11 22:35 ` [Patch net-next v2 5/8] ipv6: drop ipv6_sk_mc_lock in mcast Cong Wang
2014-09-11 22:35 ` [Patch net-next v2 6/8] ipv6: drop some rcu_read_lock " Cong Wang
2014-09-11 22:35 ` Cong Wang [this message]
2014-09-11 22:35 ` [Patch net-next v2 8/8] ipv6: refactor ipv6_dev_mc_inc() Cong Wang
2014-09-12 20:40 ` [Patch net-next v2 0/8] ipv6: clean up locking code in anycast and mcast Hannes Frederic Sowa
2014-09-13 20:39 ` David Miller

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=1410474916-21873-8-git-send-email-xiyou.wangcong@gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=davem@davemloft.net \
    --cc=hannes@stressinduktion.org \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).