]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
batman-adv: stop caching unowned originator pointers in BAT IV
authorJiexun Wang <wangjiexun2025@gmail.com>
Sun, 3 May 2026 04:28:58 +0000 (12:28 +0800)
committerSven Eckelmann <sven@narfation.org>
Fri, 8 May 2026 12:28:40 +0000 (14:28 +0200)
commitf03e8583532941b07761c5429de7d50766fa3110
treee018fd576b969c07da087105c639afb8e9d813d3
parent3d3cf6a7314aca4df0a6dde28ce784a2a30d0166
batman-adv: stop caching unowned originator pointers in BAT IV

BAT IV keeps the last-hop neighbor address in each neigh_node, but some
paths also cache an originator pointer derived from a temporary lookup.
That pointer is not owned by the neigh_node and may no longer refer to a
live originator entry after purge handling runs.

Stop storing the auxiliary originator pointer in the BAT IV neighbor
state. When BAT IV needs the neighbor originator data, resolve it from
the stored neighbor address and drop the reference again after use.

Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol")
Cc: stable@kernel.org
Reported-by: Yuan Tan <yuantan098@gmail.com>
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <bird@lzu.edu.cn>
Signed-off-by: Jiexun Wang <wangjiexun2025@gmail.com>
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
[sven: avoid bonding logic for outgoing OGM]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/bat_iv_ogm.c