summaryrefslogtreecommitdiff
path: root/net/ipv6
diff options
context:
space:
mode:
authorYue Haibing <yuehaibing@huawei.com>2025-07-14 17:19:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-07-24 09:53:19 +0300
commitdcbc346f50a009d8b7f4e330f9f2e22d6442fa26 (patch)
tree7e19789c819f5a005b637d3675bd21dcb8627fd1 /net/ipv6
parent6a213143e0eaa5cf115b487fc4b2346806c777ef (diff)
downloadlinux-dcbc346f50a009d8b7f4e330f9f2e22d6442fa26.tar.xz
ipv6: mcast: Delay put pmc->idev in mld_del_delrec()
[ Upstream commit ae3264a25a4635531264728859dbe9c659fad554 ] pmc->idev is still used in ip6_mc_clear_src(), so as mld_clear_delrec() does, the reference should be put after ip6_mc_clear_src() return. Fixes: 63ed8de4be81 ("mld: add mc_lock for protecting per-interface mld data") Signed-off-by: Yue Haibing <yuehaibing@huawei.com> Link: https://patch.msgid.link/20250714141957.3301871-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/mcast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 9bb246c09fce..e153dac47a53 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -803,8 +803,8 @@ static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im)
} else {
im->mca_crcount = idev->mc_qrv;
}
- in6_dev_put(pmc->idev);
ip6_mc_clear_src(pmc);
+ in6_dev_put(pmc->idev);
kfree_rcu(pmc, rcu);
}
}