Re: [PATCH] ipv6: addrconf: skip autoconf on unregistering devices
From: Xu Rao
Date: Tue May 12 2026 - 05:27:49 EST
Hi Eric,
Thanks for the review.
> 1) I presume this targets the net tree, rather than net-next?
Yes, this is intended for the net tree. I will keep the subject as
"[PATCH net v2]".
> 2) Please add a Fixes: tag
I looked for a Fixes target, but I could not identify a single commit
which introduced this exact bug with enough confidence. The path which
can create an IPv6 link-local address from NETDEV_UP/NETDEV_CHANGE is
very old, while the failure depends on an unregister-time race between
rtnetlink flag changes, addrconf autoconfiguration, and netdev teardown.
Because this looks like a long-standing lifecycle gap exposed by this
race rather than a clear regression from one commit, I did not want to
add a misleading Fixes tag. If you prefer a historical Fixes tag for
netdev requirements, I can add the closest addrconf change you think is
appropriate in v2.
> 3) Why READ_ONCE() are needed there?
I used READ_ONCE() in v1 because dev->reg_state is written with
WRITE_ONCE() in the unregister path and netdev_reg_state() also reads it
with READ_ONCE(). However, addrconf_notify() is called from the
netdevice notifier path and does not need lockless access semantics for
this check. I will switch this to a plain dev->reg_state load in v2.
> 4) Make sure in V2 to CC netdev@ mailing list
> 5) Please wait ~24 hours before sending a V2.
I will also make sure to CC netdev@xxxxxxxxxxxxxxx on v2 and will wait
about 24 hours before sending it, as requested.
Thanks,
Xu Rao