]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: core: neighbour: Add a neigh_fill_info() helper for when lock not held
authorPetr Machata <petrm@nvidia.com>
Wed, 21 Jan 2026 16:43:35 +0000 (17:43 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sun, 25 Jan 2026 22:57:36 +0000 (14:57 -0800)
commit77fa50dcb987338e6d5253c49d590da667b12657
treee100444d8948d1a7dc552dcb670c6df1576e2dcf
parente4faaf65a75f650ac4366ddff5dabb826029ca5a
net: core: neighbour: Add a neigh_fill_info() helper for when lock not held

The netlink message needs to be formatted and sent inside the critical
section where the neighbor is changed, so that it reflects the
notified-upon neighbor state. Because it will happen inside an already
existing critical section, it has to assume that the neighbor lock is held.
Add a helper __neigh_fill_info(), which is like neigh_fill_info(), but
makes this assumption. Convert neigh_fill_info() to a wrapper around this
new helper.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/7ec20113d5d809200e3534d3ed8f0004514914b8.1769012464.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/neighbour.c