]> git.ipfire.org Git - thirdparty/linux.git/commit
ipv4: igmp: annotate data-races around im->users
authorYuyang Huang <sigefriedhyy@gmail.com>
Fri, 22 May 2026 09:39:06 +0000 (18:39 +0900)
committerJakub Kicinski <kuba@kernel.org>
Mon, 25 May 2026 18:08:59 +0000 (11:08 -0700)
commit061c0aa740d5d3847cd600a74c66a165bee1fbe0
treecb9d45ee8d582d5f06cba77d06cb826bdf96ff28
parentc0aa5f13826dcb035bec3d6b252e6b2020fa5f88
ipv4: igmp: annotate data-races around im->users

/proc/net/igmp walks IPv4 multicast memberships under RCU and
prints im->users without holding RTNL, while multicast join and leave
paths update the field while holding RTNL. Annotate this intentional
lockless snapshot with READ_ONCE() and the matching writers with
WRITE_ONCE().

Signed-off-by: Yuyang Huang <sigefriedhyy@gmail.com>
Reviewed-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260522093906.39764-1-sigefriedhyy@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/igmp.c