2011-07-28 06:41:57

by Baruch Siach

[permalink] [raw]
Subject: [PATCH] mac80211/mesh: make the preq queue lock consistent

Make mesh_preq_queue_lock locking consistent with mesh_queue_preq() using
spin_lock_bh().

Signed-off-by: Baruch Siach <[email protected]>
---
net/mac80211/mesh_hwmp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 2b18053..fc8cb1a 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -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");
@@ -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);
--
1.7.5.4



2011-08-08 08:17:11

by Baruch Siach

[permalink] [raw]
Subject: Re: [PATCH] mac80211/mesh: make the preq queue lock consistent

Hi linux-wireless list,

On Thu, Jul 28, 2011 at 08:51:05AM +0300, Baruch Siach wrote:
> Make mesh_preq_queue_lock locking consistent with mesh_queue_preq() using
> spin_lock_bh().

Ping?

baruch

> Signed-off-by: Baruch Siach <[email protected]>
> ---
> net/mac80211/mesh_hwmp.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
> index 2b18053..fc8cb1a 100644
> --- a/net/mac80211/mesh_hwmp.c
> +++ b/net/mac80211/mesh_hwmp.c
> @@ -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");
> @@ -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);

--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -

2011-08-08 16:26:33

by Javier Cardona

[permalink] [raw]
Subject: Re: [PATCH] mac80211/mesh: make the preq queue lock consistent

On Mon, Aug 8, 2011 at 1:16 AM, Baruch Siach <[email protected]> wrote:
> Hi linux-wireless list,
>
> On Thu, Jul 28, 2011 at 08:51:05AM +0300, Baruch Siach wrote:
>> Make mesh_preq_queue_lock locking consistent with mesh_queue_preq() using
>> spin_lock_bh().

Signed-off-by: Javier Cardona <[email protected]>

Javier

> Ping?
>
> baruch
>
>> Signed-off-by: Baruch Siach <[email protected]>
>> ---
>> ?net/mac80211/mesh_hwmp.c | ? ?6 +++---
>> ?1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
>> index 2b18053..fc8cb1a 100644
>> --- a/net/mac80211/mesh_hwmp.c
>> +++ b/net/mac80211/mesh_hwmp.c
>> @@ -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");
>> @@ -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);
>
> --
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ~. .~ ? Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
> ? - [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -
>



--
Javier Cardona
cozybit Inc.
http://www.cozybit.com