Re: [PATCH 1/2] ipv4: igmp: annotate data-races around in_dev->mc_count
From: Ido Schimmel
Date: Thu Jun 04 2026 - 06:38:23 EST
On Sun, May 31, 2026 at 11:07:03AM +0800, Yuyang Huang wrote:
> /proc/net/igmp walks the multicast list for IPv4 interfaces locklessly
> under RCU and prints state->in_dev->mc_count. Concurrently, device
> init/destruction and multicast join/leave paths update the count
> under the RTNL lock. Fix this intentional lockless snapshot by
> annotating the read with READ_ONCE() and the updates with WRITE_ONCE().
>
> Fixes: 1d7138de878d ("igmp: RCU conversion of in_dev->mc_list")
Pending Paolo's approval, please drop the Fixes tag given the patch is
targeted at net-next.
> Signed-off-by: Yuyang Huang <yuyanghuang@xxxxxxxxxx>
Code looks fine:
Reviewed-by: Ido Schimmel <idosch@xxxxxxxxxx>