Skip to content

Commit b69dd5b

Browse files
edumazetkuba-moo
authored andcommitted
net: igmp: increase size of mr_ifc_count
Some arches support cmpxchg() on 4-byte and 8-byte only. Increase mr_ifc_count width to 32bit to fix this problem. Fixes: 4a2b285 ("net: igmp: fix data-race in igmp_ifc_timer_expire()") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210811195715.3684218-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 0271824 commit b69dd5b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

include/linux/inetdevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct in_device {
4141
unsigned long mr_qri; /* Query Response Interval */
4242
unsigned char mr_qrv; /* Query Robustness Variable */
4343
unsigned char mr_gq_running;
44-
unsigned char mr_ifc_count;
44+
u32 mr_ifc_count;
4545
struct timer_list mr_gq_timer; /* general query timer */
4646
struct timer_list mr_ifc_timer; /* interface change timer */
4747

net/ipv4/igmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ static void igmp_gq_timer_expire(struct timer_list *t)
803803
static void igmp_ifc_timer_expire(struct timer_list *t)
804804
{
805805
struct in_device *in_dev = from_timer(in_dev, t, mr_ifc_timer);
806-
u8 mr_ifc_count;
806+
u32 mr_ifc_count;
807807

808808
igmpv3_send_cr(in_dev);
809809
restart:

0 commit comments

Comments
 (0)