diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2014-09-11 18:35:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-13 16:38:42 -0400 |
commit | f7ed925c1b4d62e82b72d8e99fa4be52fb0c73b6 (patch) | |
tree | 5ad1c39a38621d17fd91f70c13b1b9667c015055 /net/ipv6/mcast.c | |
parent | 414b6c943fe25c5c576b6f0ce9077c29a150d826 (diff) |
ipv6: update the comment in mcast.c
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/mcast.c')
-rw-r--r-- | net/ipv6/mcast.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 4fb761d4002d..d64e26366cb8 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, | |||
556 | } | 556 | } |
557 | 557 | ||
558 | err = -EADDRNOTAVAIL; | 558 | err = -EADDRNOTAVAIL; |
559 | /* | 559 | /* changes to the ipv6_mc_list require the socket lock and |
560 | * changes to the ipv6_mc_list require the socket lock and | 560 | * rtnl lock. We have the socket lock and rcu read lock, |
561 | * a read lock on ip6_sk_mc_lock. We have the socket lock, | ||
562 | * so reading the list is safe. | 561 | * so reading the list is safe. |
563 | */ | 562 | */ |
564 | 563 | ||
@@ -582,9 +581,8 @@ int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, | |||
582 | copy_to_user(optval, gsf, GROUP_FILTER_SIZE(0))) { | 581 | copy_to_user(optval, gsf, GROUP_FILTER_SIZE(0))) { |
583 | return -EFAULT; | 582 | return -EFAULT; |
584 | } | 583 | } |
585 | /* changes to psl require the socket lock, a read lock on | 584 | /* changes to psl require the socket lock, and a write lock |
586 | * on ipv6_sk_mc_lock and a write lock on pmc->sflock. We | 585 | * on pmc->sflock. We have the socket lock so reading here is safe. |
587 | * have the socket lock, so reading here is safe. | ||
588 | */ | 586 | */ |
589 | for (i = 0; i < copycount; i++) { | 587 | for (i = 0; i < copycount; i++) { |
590 | struct sockaddr_in6 *psin6; | 588 | struct sockaddr_in6 *psin6; |
@@ -2350,7 +2348,7 @@ static int ip6_mc_leave_src(struct sock *sk, struct ipv6_mc_socklist *iml, | |||
2350 | { | 2348 | { |
2351 | int err; | 2349 | int err; |
2352 | 2350 | ||
2353 | /* callers have the socket lock and a write lock on ipv6_sk_mc_lock, | 2351 | /* callers have the socket lock and rtnl lock |
2354 | * so no other readers or writers of iml or its sflist | 2352 | * so no other readers or writers of iml or its sflist |
2355 | */ | 2353 | */ |
2356 | if (!iml->sflist) { | 2354 | if (!iml->sflist) { |