Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: [PATCH net] net: igmp: increase size of mr_ifc_count
@ 2021-08-11 20:14 Guenter Roeck
0 siblings, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2021-08-11 20:14 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David S . Miller, Jakub Kicinski, netdev, Eric Dumazet
On Wed, Aug 11, 2021 at 12:57:15PM -0700, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> 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 <edumazet@google.com>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
This patch fixes the build problems I had observed.
Tested-by: Guenter Roeck <linux@roeck-us.net>
Thanks,
Guenter
> ---
> include/linux/inetdevice.h | 2 +-
> net/ipv4/igmp.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
> index 53aa0343bf694cb817e00ff597b52ce046e29d2c..aaf4f1b4c277c4ad38e1f0742bb480d3bb003287 100644
> --- a/include/linux/inetdevice.h
> +++ b/include/linux/inetdevice.h
> @@ -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 */
>
> diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
> index a51360087b19845a28408c827032e08dabf99838..00576bae183d30518e376ad3846d4fe6025aaea7 100644
> --- a/net/ipv4/igmp.c
> +++ b/net/ipv4/igmp.c
> @@ -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:
> --
> 2.32.0.605.g8dce9f2422-goog
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: igmp: increase size of mr_ifc_count
2021-08-11 19:57 Eric Dumazet
@ 2021-08-11 23:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-08-11 23:10 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, kuba, netdev, edumazet, linux
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Wed, 11 Aug 2021 12:57:15 -0700 you wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> 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 <edumazet@google.com>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
>
> [...]
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH net] net: igmp: increase size of mr_ifc_count
@ 2021-08-11 19:57 Eric Dumazet
2021-08-11 23:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2021-08-11 19:57 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski
Cc: netdev, Eric Dumazet, Eric Dumazet, Guenter Roeck
From: Eric Dumazet <edumazet@google.com>
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 <edumazet@google.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
---
include/linux/inetdevice.h | 2 +-
net/ipv4/igmp.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index 53aa0343bf694cb817e00ff597b52ce046e29d2c..aaf4f1b4c277c4ad38e1f0742bb480d3bb003287 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -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 */
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index a51360087b19845a28408c827032e08dabf99838..00576bae183d30518e376ad3846d4fe6025aaea7 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -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:
--
2.32.0.605.g8dce9f2422-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-11 23:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 20:14 [PATCH net] net: igmp: increase size of mr_ifc_count Guenter Roeck
-- strict thread matches above, loose matches on Subject: below --
2021-08-11 19:57 Eric Dumazet
2021-08-11 23:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).