Re: [PATCH net-next] ipv6: Serialize hardware flag notifications

From: Yuyang Huang

Date: Thu Aug 20 2026 - 07:43:13 EST


On Wed, Aug 19, 2026 at 8:51 PM Ido Schimmel <idosch@xxxxxxxxxx> wrote:
>
> Yes, it's racy, but I don't have good solution that also covers IPv4.
> IPv4 routes are protected by RTNL and taking RTNL in this path will
> cause lock inversion.

Thanks, I agree it seems like the same idea does not apply to IPv4
code paths. It seems like to truly this issue will need more
thought/refactoring.

> Also, as far as I'm aware, this isn't a problem in practice. These
> notifications (disabled by default) are mainly used by routing daemons
> that want to suppress the advertisement of a route until it's offloaded.
> If they added it and immediately deleted it, then it doesn't make sense
> to advertise it.

Hmm, this argument seems weak. I think relying on expected userspace
behavior is not sufficient to dismiss the race, since kernel can emit
RTM_NEWROUTE after RTM_DELROUTE seems really should't be expected.

That said, I agree that an IPv6-only fix is incomplete, and I do not
currently see a good/cheap way to cover IPv4 without introducing a
lock inversion. I am not sufficiently familiar with this code path to
propose a broader solution, so I will drop the patch for now.

Thanks,
Yuyang