mac80211: fix and simplify mesh locking
authorJohannes Berg <johannes.berg@intel.com>
Sat, 14 May 2011 09:00:52 +0000 (11:00 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 16 May 2011 18:25:29 +0000 (14:25 -0400)
commit1928ecab620907a0953f811316d05f367f3f4dba
treec97ce24a7d86ad58c148ef8905c72c5705d12f4a
parentd07c7cf49ae7c488e778c4d668f4cc10bd2fa971
mac80211: fix and simplify mesh locking

The locking in mesh_{mpath,mpp}_table_grow not only
has an rcu_read_unlock() missing, it's also racy
(though really only technically since it's invoked
from a single function only) since it obtains the
new size of the table without any locking, so two
invocations of the function could attempt the same
resize.

Additionally, it uses synchronize_rcu() which is
rather expensive and can be avoided trivially here.

Modify the functions to only use the table lock
and use call_rcu() instead of synchronize_rcu().

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mesh.h
net/mac80211/mesh_pathtbl.c