]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ipv6: mcast: Remove unnecessary ASSERT_RTNL and comment.
authorKuniyuki Iwashima <kuniyu@google.com>
Wed, 2 Jul 2025 23:01:27 +0000 (16:01 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 9 Jul 2025 01:32:38 +0000 (18:32 -0700)
Now, RTNL is not needed for mcast code, and what's commented in
ip6_mc_msfget() is apparent by for_each_pmc_socklock(), which has
lockdep annotation for lock_sock().

Let's remove the comment and ASSERT_RTNL() in ipv6_mc_rejoin_groups().

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250702230210.3115355-11-kuni1840@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/mcast.c

index edae7770bf8c916bdd8992ae208d5f019a212199..6c875721d423190ceed4ee17f35996757df1776f 100644 (file)
@@ -605,10 +605,6 @@ int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
        if (!ipv6_addr_is_multicast(group))
                return -EINVAL;
 
-       /* changes to the ipv6_mc_list require the socket lock and
-        * rtnl lock. We have the socket lock, so reading the list is safe.
-        */
-
        for_each_pmc_socklock(inet6, sk, pmc) {
                if (pmc->ifindex != gsf->gf_interface)
                        continue;
@@ -2880,8 +2876,6 @@ static void ipv6_mc_rejoin_groups(struct inet6_dev *idev)
 {
        struct ifmcaddr6 *pmc;
 
-       ASSERT_RTNL();
-
        mutex_lock(&idev->mc_lock);
        if (mld_in_v1_mode(idev)) {
                for_each_mc_mclock(idev, pmc)