Skip to content

Commit

Permalink
mac80211/mesh: make the preq queue lock consistent
Browse files Browse the repository at this point in the history
Make mesh_preq_queue_lock locking consistent with mesh_queue_preq() using
spin_lock_bh().

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Baruch Siach authored and John W. Linville committed Aug 8, 2011
1 parent dfb72c4 commit 987dafa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/mac80211/mesh_hwmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,9 +792,9 @@ static void mesh_queue_preq(struct mesh_path *mpath, u8 flags)
return;
}

spin_lock(&ifmsh->mesh_preq_queue_lock);
spin_lock_bh(&ifmsh->mesh_preq_queue_lock);
if (ifmsh->preq_queue_len == MAX_PREQ_QUEUE_LEN) {
spin_unlock(&ifmsh->mesh_preq_queue_lock);
spin_unlock_bh(&ifmsh->mesh_preq_queue_lock);
kfree(preq_node);
if (printk_ratelimit())
mhwmp_dbg("PREQ node queue full\n");
Expand All @@ -806,7 +806,7 @@ static void mesh_queue_preq(struct mesh_path *mpath, u8 flags)

list_add_tail(&preq_node->list, &ifmsh->preq_queue.list);
++ifmsh->preq_queue_len;
spin_unlock(&ifmsh->mesh_preq_queue_lock);
spin_unlock_bh(&ifmsh->mesh_preq_queue_lock);

if (time_after(jiffies, ifmsh->last_preq + min_preq_int_jiff(sdata)))
ieee80211_queue_work(&sdata->local->hw, &sdata->work);
Expand Down

0 comments on commit 987dafa

Please sign in to comment.