From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Marek Lindner Date: Wed, 17 Apr 2013 23:56:55 +0800 References: <20130417120550.GD20819@ritirata.org> <1366202206-32718-1-git-send-email-martin@hundeboll.net> In-Reply-To: <1366202206-32718-1-git-send-email-martin@hundeboll.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201304172356.55561.lindner_marek@yahoo.de> Subject: Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: Avoid double freeing of bat_counters Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: The list for a Better Approach To Mobile Ad-hoc Networking On Wednesday, April 17, 2013 20:36:46 Martin Hundeb=C3=B8ll wrote: > --- a/soft-interface.c > +++ b/soft-interface.c > @@ -497,12 +497,10 @@ static int batadv_softif_init_late(struct net_device > *dev)=20 > ret =3D batadv_mesh_init(dev); > if (ret < 0) > - goto unreg_debugfs; > + batadv_debugfs_del_meshif(dev); > =20 > - return 0; > + return ret; > =20 > -unreg_debugfs: > - batadv_debugfs_del_meshif(dev); > free_bat_counters: > free_percpu(bat_priv->bat_counters); > =20 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 in= to=20 this problem again when somebody else changes the order of the calls ... Cheers, Marek