summaryrefslogtreecommitdiff
path: root/net/ipv4/igmp.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-12-04 07:42:16 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-12-04 07:42:16 +0100
commit4906f39a1343713a4fb3fe78aecd12eba5257dc0 (patch)
tree2487e32b1e02681683a842f26bbc05e9d1aba308 /net/ipv4/igmp.c
parentaf54d778a03853801d681c98c0c2a6c316ef9ca7 (diff)
parent33cc938e65a98f1d29d0a18403dbbee050dcad9a (diff)
Merge 6.7-rc4 into char-misc-linus
We need 6.7-rc4 in here as we need to revert one of the debugfs changes that came in that release through the wireless tree. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4/igmp.c')
-rw-r--r--net/ipv4/igmp.c6
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)