All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Linus Lüssing" <linus.luessing@c0d3.blue>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH v2 2/2] batman-adv: Simple (re)broadcast avoidance
Date: Thu, 4 Aug 2016 01:43:29 +0200	[thread overview]
Message-ID: <20160803234329.GD16866@otheros> (raw)
In-Reply-To: <20160803212552.GB16866@otheros>

On Wed, Aug 03, 2016 at 11:25:53PM +0200, Linus Lüssing wrote:
> On Wed, Aug 03, 2016 at 09:59:27PM +0200, Sven Eckelmann wrote:
> > Isn't this causing the reference counting cycle (aka really, really,
> > really bad):
> 
> Hm, I see what you are getting at. Could indeed be a nasty bug...
> 
> But, actually, just tested in VMs, seems like I'm getting a call to
> batadv_hardif_neigh_release() just fine. Which means it counted to
> zero successfully o_O?
> 
> I don't understand why it seems to work right now :D. Will dig deeper.

Ok, I think it just works because hardif_neigh_create()
intializes the nodes refcount to one (in contrast to other allocating
functions which initialize to 2). In the end, once
neigh_node_create() finishes, it stays at one.

So the regular purging routines will break the cycle in the end
when they reduce the refcount of the hardif_neigh_node to zero.

  reply	other threads:[~2016-08-03 23:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-01 20:38 [B.A.T.M.A.N.] [PATCH v2 1/2] batman-adv: Remove unused skb_reset_mac_header() Linus Lüssing
2016-08-01 20:38 ` [B.A.T.M.A.N.] [PATCH v2 2/2] batman-adv: Simple (re)broadcast avoidance Linus Lüssing
2016-08-03 19:59   ` Sven Eckelmann
2016-08-03 21:25     ` Linus Lüssing
2016-08-03 23:43       ` Linus Lüssing [this message]
2016-08-04  5:56         ` Sven Eckelmann
2016-08-04  6:09           ` Sven Eckelmann
2016-08-06  1:11           ` Linus Lüssing
2016-08-06  8:13             ` Sven Eckelmann
2016-08-06 19:58               ` Linus Lüssing
2016-08-04  7:29         ` Sven Eckelmann
2016-08-06  1:04           ` Linus Lüssing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160803234329.GD16866@otheros \
    --to=linus.luessing@c0d3.blue \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.