Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86d7f9f3 authored by Javier Cardona's avatar Javier Cardona Committed by John W. Linville
Browse files

mac80211: fix mpath timer NULL function



If we have an mpath whose timer has not been initialized, don't try to
delete it.

Signed-off-by: default avatarJavier Cardona <javier@cozybit.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7646887a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -619,6 +619,7 @@ static void mesh_path_node_reclaim(struct rcu_head *rp)
	struct mpath_node *node = container_of(rp, struct mpath_node, rcu);
	struct ieee80211_sub_if_data *sdata = node->mpath->sdata;

	if (node->mpath->timer.function)
		del_timer_sync(&node->mpath->timer);
	atomic_dec(&sdata->u.mesh.mpaths);
	kfree(node->mpath);
@@ -768,6 +769,7 @@ static void mesh_path_node_free(struct hlist_node *p, bool free_leafs)
	mpath = node->mpath;
	hlist_del_rcu(p);
	if (free_leafs) {
		if (mpath->timer.function)
			del_timer_sync(&mpath->timer);
		kfree(mpath);
	}