From: Marek Lindner <mareklindner@neomailbox.ch>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Antonio Quartulli <antonio@open-mesh.com>,
Antonio Quartulli <antonio@meshcoding.com>
Subject: Re: [B.A.T.M.A.N.] [PATCHv2 maint] batman-adv: increase orig refcount when storing ref in gw_node
Date: Mon, 05 May 2014 00:21:04 +0800 [thread overview]
Message-ID: <1591963.nuHQXu0VkJ@diderot> (raw)
In-Reply-To: <1398987313-11934-1-git-send-email-antonio@meshcoding.com>
[-- Attachment #1: Type: text/plain, Size: 773 bytes --]
On Friday 02 May 2014 01:35:13 Antonio Quartulli wrote:
> From: Antonio Quartulli <antonio@open-mesh.com>
>
> A pointer to the orig_node representing a bat-gateway is
> stored in the gw_node->orig_node member, but the refcount
> for such orig_node is never increased.
> This leads to memory faults when gw_node->orig_node is accessed
> and the originator has already been freed.
>
> Fix this by increasing the refcount on gw_node creation
> and decreasing it on gw_node free.
>
> Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
> ---
>
> Change since v1:
> - properly release orig_node in case of gw_node allocation failure
>
> gateway_client.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
Applied in revision 8dbdee5.
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
prev parent reply other threads:[~2014-05-04 16:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-01 23:35 [B.A.T.M.A.N.] [PATCHv2 maint] batman-adv: increase orig refcount when storing ref in gw_node Antonio Quartulli
2014-05-04 16:21 ` Marek Lindner [this message]
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=1591963.nuHQXu0VkJ@diderot \
--to=mareklindner@neomailbox.ch \
--cc=antonio@meshcoding.com \
--cc=antonio@open-mesh.com \
--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