From: Marek Lindner <lindner_marek@yahoo.de>
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.] [PATCHv2] batman-adv: Avoid double freeing of bat_counters
Date: Wed, 17 Apr 2013 23:56:55 +0800 [thread overview]
Message-ID: <201304172356.55561.lindner_marek@yahoo.de> (raw)
In-Reply-To: <1366202206-32718-1-git-send-email-martin@hundeboll.net>
On Wednesday, April 17, 2013 20:36:46 Martin Hundebøll wrote:
> --- a/soft-interface.c
> +++ b/soft-interface.c
> @@ -497,12 +497,10 @@ static int batadv_softif_init_late(struct net_device
> *dev)
> ret = batadv_mesh_init(dev);
> if (ret < 0)
> - goto unreg_debugfs;
> + batadv_debugfs_del_meshif(dev);
>
> - return 0;
> + return ret;
>
> -unreg_debugfs:
> - batadv_debugfs_del_meshif(dev);
> free_bat_counters:
> free_percpu(bat_priv->bat_counters);
>
This looks like a valid problem but I do suggest setting bat_priv-
>bat_counters to NULL after calling free_percpu(). Otherwise we will run into
this problem again when somebody else changes the order of the calls ...
Cheers,
Marek
next prev parent reply other threads:[~2013-04-17 15:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-17 10:28 [B.A.T.M.A.N.] [PATCH] batman-adv: Avoid double freeing of bat_counters Martin Hundebøll
2013-04-17 12:05 ` Antonio Quartulli
2013-04-17 12:36 ` [B.A.T.M.A.N.] [PATCHv2] " Martin Hundebøll
2013-04-17 15:56 ` Marek Lindner [this message]
2013-04-17 19:13 ` [B.A.T.M.A.N.] [PATCHv3] " Martin Hundebøll
2013-04-17 19:53 ` 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=201304172356.55561.lindner_marek@yahoo.de \
--to=lindner_marek@yahoo.de \
--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