Re: [PATCH 1/2] ipv4: igmp: annotate data-races around in_dev->mc_count
From: Ido Schimmel
Date: Thu Jun 04 2026 - 06:23:27 EST
On Thu, Jun 04, 2026 at 11:15:29AM +0200, Paolo Abeni wrote:
> On 6/4/26 11:11 AM, Paolo Abeni wrote:
> > On 5/31/26 5:07 AM, Yuyang Huang wrote:
> >> @@ -1922,7 +1923,7 @@ void ip_mc_destroy_dev(struct in_device *in_dev)
> >>
> >> while ((i = rtnl_dereference(in_dev->mc_list)) != NULL) {
> >> in_dev->mc_list = i->next_rcu;
> >> - in_dev->mc_count--;
> >> + WRITE_ONCE(in_dev->mc_count, in_dev->mc_count - 1);
> >> ip_mc_clear_src(i);
> >> ip_ma_put(i);
> >
> > The patch LGTM,
> But it does not apply cleanly to net. Please rebase and report, adding
> the target tree (`net`) and a revision number (`v2`) in the subj prefix.
Paolo, I think it's better to target such patches at net-next and
dropping the fixes tag.
See for example this recent patch that went into net-next:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/net/ipv4/igmp.c?id=061c0aa740d5d3847cd600a74c66a165bee1fbe0
And this message from Linus:
https://lwn.net/Articles/1074171/