public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <mareklindner@neomailbox.ch>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH maint] batman-adv: fix potential TT client + orig-node memory leak
Date: Mon, 29 Dec 2014 11:52:53 +0800	[thread overview]
Message-ID: <1869722.k5Ufm3Cai9@diderot> (raw)
In-Reply-To: <1418509935-11849-1-git-send-email-linus.luessing@c0d3.blue>

[-- Attachment #1: Type: text/plain, Size: 1806 bytes --]

On Saturday 13 December 2014 23:32:15 Linus Lüssing wrote:
> This patch fixes a potential memory leak which can occur once an
> originator times out. On timeout the according global translation table
> entry might not get purged correctly. Furthermore, the non purged TT
> entry will cause its orig-node to leak, too. Which additionally can lead
> to the new multicast optimization feature not kicking in because of a
> therefore bogus counter.

So far, I am with you ..


> In the wild with larger mesh networks we saw this leak quite regularly,
> resulting in routers to reboot or killed processes. This was because
> of a combination of two bugs: The bug fixed by commit
> "batman-adv: fix delayed foreign originator recognition" (8a2ad5204674)
> amplified this memory leak heavily. Since that commit I'd expect
> it to happen rarely, probably only in paused and resumed VMs and
> devices previously in stand-by.

This section shouldn't be part of the official commit message. It is hardly 
relevant to the reviewer how often a memleak occurs and whether or not you 
need a VM to trigger it. The provided commit id isn't valid in the Linux tree.


> The issue this patch fixes is caused by batadv_orig_node_free_rcu()
> never being called because of not yet released references to the
> orig-node. References which were supposed to be released through
> batadv_orig_node_free_rcu()->batadv_tt_global_del_orig().

Could you please provide addition insight as to which references are still 
held ? I did look around but nothing obvious jumped at me. 

Generally, it wouldn't be bad if the commit message went into deeper detail 
describing the nature of the bug instead of the middle section above to make 
it easy to understand what is being fixed.


Cheers,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2014-12-29  3:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-13 22:32 [B.A.T.M.A.N.] [PATCH maint] batman-adv: fix potential TT client + orig-node memory leak Linus Lüssing
2014-12-29  3:52 ` Marek Lindner [this message]
2014-12-29 14:32   ` Linus Lüssing
2015-01-04 16:05   ` Antonio Quartulli
2015-01-04 16:11     ` Antonio Quartulli
2015-01-05 17:22       ` Marek Lindner

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=1869722.k5Ufm3Cai9@diderot \
    --to=mareklindner@neomailbox.ch \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox