Re: [PATCH net 1/1] batman-adv: hold claim backbone gateways by reference
Sven Eckelmann <[email protected]>
| Newsgroups | org.open-mesh.lists.batman,org.kernel.vger.netdev |
|---|---|
| Message-ID | <6721686.DvuYhMxLoT@sven-desktop> |
On Monday, 6 April 2026 15:17:28 CEST Ao Zhou wrote: > From: Haoze Xie <[email protected]> > > batadv_bla_add_claim() can replace claim->backbone_gw and drop the old > gateway's last reference while readers still follow the pointer. > > The netlink claim dump path dereferences claim->backbone_gw->orig and > takes claim->backbone_gw->crc_lock without pinning the underlying > backbone gateway. batadv_bla_check_claim() still has the same naked > pointer access pattern. > > Reuse batadv_bla_claim_get_backbone_gw() in both readers so they operate > on a stable gateway reference until the read-side work is complete. > This keeps the dump and claim-check paths aligned with the lifetime > rules introduced for the other BLA claim readers. > > Fixes: 23721387c409 ("batman-adv: add basic bridge loop avoidance code") > Fixes: 04f3f5bf1883 ("batman-adv: add B.A.T.M.A.N. Dump BLA claims via netlink") > Reported-by: Yifan Wu <[email protected]> > Reported-by: Juefei Pu <[email protected]> > Co-developed-by: Yuan Tan <[email protected]> > Signed-off-by: Yuan Tan <[email protected]> > Suggested-by: Xin Liu <[email protected]> > Signed-off-by: Haoze Xie <[email protected]> > Signed-off-by: Ao Zhou <[email protected]> > --- > net/batman-adv/bridge_loop_avoidance.c | 27 +++++++++++++++++--------- > 1 file changed, 18 insertions(+), 9 deletions(-) Applied, thanks! [1/1] batman-adv: hold claim backbone gateways by reference https://git.open-mesh.org/linux-merge.git/commit/?h=batadv/net&id=82d8701b2c930d0e96b0dbc9115a218d791cb0d2 Best regards, --- Sven
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQS81G/PswftH/OW8cVND3cr0xT1ywUCadO6LQAKCRBND3cr0xT1 y26iAQCjQv+PeIhpfRpwFpDi1Zektlh+3ZpKeTsIhBbRNXUa2QD/fvkRpCmUVrPR ILSBN6mBEL93oFdBwIh3VqNG9kzmPQ4= =GnOB -----END PGP SIGNATURE-----