Re: [PATCH net 1/1] batman-adv: stop caching unowned originator pointers in BAT IV
Sven Eckelmann <[email protected]>
| Newsgroups | org.open-mesh.lists.batman,org.kernel.vger.netdev |
|---|---|
| Message-ID | <177779702879.645574.14368201380729825498.b4-review@b4> |
On Sun, 03 May 2026 12:28:58 +0800, Ren Wei <[email protected]> wrote: > [...] > Reported-by: Yuan Tan <[email protected]> > Reported-by: Yifan Wu <[email protected]> > Reported-by: Juefei Pu <[email protected]> > Reported-by: Xin Liu <[email protected]> > Signed-off-by: Jiexun Wang <[email protected]> > Signed-off-by: Ren Wei <[email protected]> This looks half finished from the types perspective: net/batman-adv/bat_v_ogm.c: 713 | if (router && router->orig_node != orig_node && !orig_neigh_router) { net/batman-adv/originator.c: 697 | neigh_node->orig_node = orig_node; net/batman-adv/types.h: 631 | struct batadv_orig_node *orig_node; Not sure if __private and ACCESS_PRIVATE() would be an option - just to handle this non-deref comparison while still allowing a fast comparison of the pointer value. I don't want to make this a show-stopper - just a possibility to think about this for a moment. Especially because I am waiting for some info about the sashiko.dev "Embargoed" state > > > diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c > index f28e9cbf..168b413d 100644 > --- a/net/batman-adv/bat_iv_ogm.c > +++ b/net/batman-adv/bat_iv_ogm.c > @@ -906,6 +899,31 @@ static u8 batadv_iv_orig_ifinfo_sum(struct batadv_orig_node *orig_node, > [ ... skip 22 lines ... ] > + sum = batadv_iv_orig_ifinfo_sum(orig_neigh, neigh_node->if_incoming); > + batadv_orig_node_put(orig_neigh); > + > + return sum; > +} > + @Marek, @Simon, Maybe you can also get a good cup of tea and think (besides performance implications) think about other side effects. -- Sven Eckelmann <[email protected]>