Subject: Re: [PATCH net-next v2 6/8] net: core: neighbour: Reorder netlink & internal notification

From: Jakub Kicinski <[email-masked]>
Date: Sun, 25 Jan 2026 14:59:22 -0800

On Wed, 21 Jan 2026 17:43:40 +0100 Petr Machata wrote:
> The netlink message needs to be send inside the critical section where the
> neighbor is changed, so that it reflects the notified-upon neighbor state.
> On the other hand, there is no such need in case of notifier chain: the
> listeners do not assume lock, and often in fact just schedule a delayed
> work to act on the neighbor later. At least one in fact also takes the
> neighbor lock.
> 
> This requires that the netlink notification be done before the internal
> notifier chain message is sent. That is safe to do, because the current
> listeners, as well as __neigh_notify(), only read the updated neighbor
> fields, and never modify them. (Apart from locking.)

Hopefully we're not setting a trap here that some driver will later
fall into.