Re: [PATCH 5.15.y] batman-adv: hold claim backbone gateways by reference
Sven Eckelmann <[email protected]>
| Newsgroups | org.open-mesh.lists.batman,org.kernel.vger.linux-kernel,org.kernel.vger.netdev,org.kernel.vger.stable |
|---|---|
| Message-ID | <1857579.VLH7GnMWUR@ripper> |
On Thursday, 30 April 2026 09:16:45 CEST Robert Garcia wrote: > From: Haoze Xie <[email protected]> > > [ Upstream commit 82d8701b2c930d0e96b0dbc9115a218d791cb0d2 ] > > 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") > Cc: [email protected] > 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]> > Signed-off-by: Sven Eckelmann <[email protected]> > Signed-off-by: Simon Wunderlich <[email protected]> > Signed-off-by: Robert Garcia <[email protected]> See https://lore.kernel.org/r/[email protected] for the original backport. Can you explain further why you send a new version? Sasha Levin <[email protected]> picked it up for 5.15.y (on Sun, 19 Apr 2026 21:13:58 -0400, MsgId [email protected]). Yes, it was not yet published or 5.15 - so maybe fell through the cracks. Regards, Sven
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQS81G/PswftH/OW8cVND3cr0xT1ywUCafMG3QAKCRBND3cr0xT1 y41NAQDcrtNDGgWALEYpUXSE0WJzqoMrzlHp9SPLAwNG0wQnAgD+KXx7wBA9AmQ5 m9xfCxUXBRwKccOO0RwYSOtd4QP3igY= =5+3O -----END PGP SIGNATURE-----