ipv4: igmp: annotate data-races around timer-related fields
authorYuyang Huang <yuyanghuang@google.com>
Fri, 5 Jun 2026 01:43:18 +0000 (10:43 +0900)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 9 Jun 2026 11:19:33 +0000 (13:19 +0200)
commit3289d17b7a1321e103b8aec4ad82675c03c4764f
tree34881e7fdf4a0904544203a15d1f6882bc03c624
parent1719841cab55d9da92b2e55b6e0c701e10201467
ipv4: igmp: annotate data-races around timer-related fields

/proc/net/igmp walks the multicast list locklessly under RCU and reads
timer-related fields (im->tm_running, im->reporter, im->timer.expires)
to print the timer state of multicast memberships. Concurrently, these
fields are modified under im->lock spinlock in timer management paths
(igmp_stop_timer(), igmp_start_timer(), and igmp_timer_expire()). Fix this
intentional lockless snapshot by annotating the lockless reads with
READ_ONCE() and the updates with WRITE_ONCE().

Signed-off-by: Yuyang Huang <yuyanghuang@google.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260605014318.3890804-3-yuyanghuang@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/ipv4/igmp.c