mac80211: mesh locking fixes
authorJavier Cardona <javier@cozybit.com>
Tue, 9 Aug 2011 23:45:06 +0000 (16:45 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 24 Aug 2011 17:59:42 +0000 (13:59 -0400)
mesh_queue_preq is invoked invoked from both user (work queue) and
softirq (timer) context, so the _bh version of spinlock needs to be
used. Also, the mpath->state_lock should be softirq safe as well.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mesh_pathtbl.c

index bfd7638e235fe9a1668e8c2fd0ce98a535b4df36..385f9fc526db3f57a8a36f792a07054cdeda0407 100644 (file)
@@ -654,12 +654,12 @@ int mesh_path_del(u8 *addr, struct ieee80211_sub_if_data *sdata)
                mpath = node->mpath;
                if (mpath->sdata == sdata &&
                    memcmp(addr, mpath->dst, ETH_ALEN) == 0) {
-                       spin_lock(&mpath->state_lock);
+                       spin_lock_bh(&mpath->state_lock);
                        mpath->flags |= MESH_PATH_RESOLVING;
                        hlist_del_rcu(&node->list);
                        call_rcu(&node->rcu, mesh_path_node_reclaim);
                        atomic_dec(&tbl->entries);
-                       spin_unlock(&mpath->state_lock);
+                       spin_unlock_bh(&mpath->state_lock);
                        goto enddel;
                }
        }
This page took 0.028558 seconds and 5 git commands to generate.