Re: [B.A.T.M.A.N.] [PATCH v2 07/30] batman-adv: Drop immediate batadv_hardif_neigh_node free function

Linus Lüssing
2016-01-05T01:50:31Z

On Tue, Jan 05, 2016 at 02:31:14AM +0100, Linus Lüssing wrote:
> On Sun, Dec 20, 2015 at 02:17:47PM +0100, Sven Eckelmann wrote:
> > @@ -278,8 +258,8 @@ static void batadv_neigh_node_free_rcu(struct rcu_head *rcu)
> > neigh_node->addr);
> > if (hardif_neigh) {
> > /* batadv_hardif_neigh_get() increases refcount too */
> > - batadv_hardif_neigh_free_now(hardif_neigh);
> > - batadv_hardif_neigh_free_now(hardif_neigh);
> > + batadv_hardif_neigh_free_ref(hardif_neigh);
> > + batadv_hardif_neigh_free_ref(hardif_neigh);
> > }
>
> Hm, this trades one bug for an intermediate one, a nested
> call-rcu. Swapping this patch with patch number 9 to avoid this?
> (tried that an the diffs seem cleaner to me after swapping; or am
> I missing something?)

Actually, forget about that. Just noticed, one way or another
there will be one intermediate bug. Don't see another way for that
right now either.