net: igmp: increase size of mr_ifc_count
Subsystems (3)
PATCH 1/1 net: igmp: increase size of mr_ifc_count
From: Eric Dumazet <[email protected]>
Some arches support cmpxchg() on 4-byte and 8-byte only. Increase mr_ifc_count width to 32bit to fix this problem.
Fixes 4a2b285e7e10 ("net: igmp: fix data-race in igmp_ifc_timer_expire()")
Signed-off-by Eric Dumazet <[email protected]>
Reported-by Guenter Roeck <[email protected]>
--- include/linux/inetdevice.h | 2 +- net/ipv4/igmp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/linux/inetdevice.h +1 -1
@@ -41,7 +41,7 @@ struct in_device {unsigned long mr_qri;/* Query Response Interval */ unsigned char mr_qrv;/* Query Robustness Variable */ unsigned char mr_gq_running; -unsigned char mr_ifc_count; +u32 mr_ifc_count;struct timer_list mr_gq_timer;/* general query timer */ struct timer_list mr_ifc_timer;/* interface change timer */
net/ipv4/igmp.c +1 -1
@@ -803,7 +803,7 @@ static void igmp_gq_timer_expire(struct timer_list *t)static void igmp_ifc_timer_expire (struct timer_list *t) {struct in_device *in_dev =from_timer (in_dev, t, mr_ifc_timer); -u8 mr_ifc_count; +u32 mr_ifc_count;igmpv3_send_cr (in_dev); restart:
Signature · 1 line
2.32.0.605.g8dce9f2422-goog
This patch was applied to netdev/net.git (refs/heads/master):
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
Quoted 10 lines · On Wed, 11 Aug 2021 12:57:15 -0700 you wrote:
From: Eric Dumazet <[email protected]>
Some arches support
cmpxchg()on 4-byte and 8-byte only. Increasemr_ifc_countwidth to 32bit to fix this problem.Fixes 4a2b285e7e10 ("net: igmp: fix data-race in igmp_ifc_timer_expire()")Signed-off-by Eric Dumazet <[email protected]>Reported-by Guenter Roeck <[email protected]>[...]
Here is the summary with links:
- [net] net: igmp: increase size of mr_ifc_count
https://git.kernel.org/netdev/net/c/b69dd5b3780a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html