Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
>---------------------------------------------------------------
commit 4b1dc4a8ae6c0e0792324cee5cf62f8056d2a031
Merge: bf140c3 675a590
Author: Marek Lindner <lindner_marek(a)yahoo.de>
Date: Thu May 9 17:43:27 2013 +0800
Merge branch 'next'
>---------------------------------------------------------------
4b1dc4a8ae6c0e0792324cee5cf62f8056d2a031
main.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --cc main.c
index f07dd6b,51aafd6..af89c09
--- a/main.c
+++ b/main.c
@@@ -163,18 -160,26 +163,26 @@@ void batadv_mesh_free(struct net_devic
batadv_purge_outstanding_packets(bat_priv, NULL);
- batadv_vis_quit(bat_priv);
-
batadv_gw_node_purge(bat_priv);
- batadv_originator_free(bat_priv);
batadv_nc_free(bat_priv);
+ batadv_dat_free(bat_priv);
+ batadv_bla_free(bat_priv);
+ /* Free the TT and the originator tables only after having terminated
+ * all the other depending components which may use these structures for
+ * their purposes.
+ */
batadv_tt_free(bat_priv);
- batadv_bla_free(bat_priv);
-
- batadv_dat_free(bat_priv);
+ /* Since the originator table clean up routine is accessing the TT
+ * tables as well, it has to be invoked after the TT tables have been
+ * freed and marked as empty. This ensures that no cleanup RCU callbacks
+ * accessing the TT data are scheduled for later execution.
+ */
+ batadv_originator_free(bat_priv);
+ batadv_gw_free(bat_priv);
+
free_percpu(bat_priv->bat_counters);
bat_priv->bat_counters = NULL;