diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-11-30 16:10:40 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-11-30 16:11:19 -0800 |
commit | 975f2d73a99f35b57ffa2ad7bff8562225cdcfcb (patch) | |
tree | d6c9ce96cfd889281e003a310c79d5a12a3cf924 /net/ipv4 | |
parent | f9893fdac319bb2817e5e7818870264d7fb2eb02 (diff) | |
parent | 6172a5180fcc65170bfa2d49e55427567860f2a7 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.
No conflicts.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/igmp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 76c3ea75b8dd..efeeca2b1328 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -216,8 +216,10 @@ static void igmp_start_timer(struct ip_mc_list *im, int max_delay) int tv = get_random_u32_below(max_delay); im->tm_running = 1; - if (!mod_timer(&im->timer, jiffies+tv+2)) - refcount_inc(&im->refcnt); + if (refcount_inc_not_zero(&im->refcnt)) { + if (mod_timer(&im->timer, jiffies + tv + 2)) + ip_ma_put(im); + } } static void igmp_gq_start_timer(struct in_device *in_dev) |