Skip to content

Commit 0bed115

Browse files
CKI Backport BotHangbin Liu
authored andcommitted
ipv6: mcast: Remove unnecessary ASSERT_RTNL and comment.
JIRA: https://issues.redhat.com/browse/RHEL-115325 commit 49b8223 Author: Kuniyuki Iwashima <kuniyu@google.com> Date: Wed Jul 2 16:01:27 2025 -0700 ipv6: mcast: Remove unnecessary ASSERT_RTNL and comment. 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> Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
1 parent 22701a3 commit 0bed115

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

net/ipv6/mcast.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,6 @@ int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
605605
if (!ipv6_addr_is_multicast(group))
606606
return -EINVAL;
607607

608-
/* changes to the ipv6_mc_list require the socket lock and
609-
* rtnl lock. We have the socket lock, so reading the list is safe.
610-
*/
611-
612608
for_each_pmc_socklock(inet6, sk, pmc) {
613609
if (pmc->ifindex != gsf->gf_interface)
614610
continue;
@@ -2880,8 +2876,6 @@ static void ipv6_mc_rejoin_groups(struct inet6_dev *idev)
28802876
{
28812877
struct ifmcaddr6 *pmc;
28822878

2883-
ASSERT_RTNL();
2884-
28852879
mutex_lock(&idev->mc_lock);
28862880
if (mld_in_v1_mode(idev)) {
28872881
for_each_mc_mclock(idev, pmc)

0 commit comments

Comments
 (0)