mac80211: fix mesh deadlock
commitecccd072b07e7fd09c54d0f86f9374e2645cde97
authorThomas Pedersen <thomas@cozybit.com>
Mon, 10 Jun 2013 20:17:21 +0000 (10 13:17 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 11 Jun 2013 11:14:42 +0000 (11 13:14 +0200)
tree8f2bc22f2aa1cb5a96d31ec3f7d87e6400d915e2
parent780b40df12cf0161d8ccc5381940e04584793933
mac80211: fix mesh deadlock

The patch "cfg80211/mac80211: use cfg80211 wdev mutex in
mac80211" introduced several deadlocks by converting the
ifmsh->mtx to wdev->mtx. Solve these by:

1. drop the cancel_work_sync() in ieee80211_stop_mesh().
   Instead make the mesh work conditional on whether the mesh
   is running or not.
2. lock the mesh work with sdata_lock() to protect beacon
   updates and prevent races with wdev->mesh_id_len or
   cfg80211.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mesh.c
net/mac80211/mesh_plink.c