2013-02-04 22:13:46

by Thomas Pedersen

[permalink] [raw]
Subject: [PATCH] mac80211: stop plink timer only on mesh interfaces

Since mesh_plink_quiesce() would unconditionally delete
the plink timer, and the timer initialization was recently
moved into the mesh code path, suspending with a non-mesh
interface now causes a crash. Fix this by only deleting
the plink timer for mesh interfaces.

Reported-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Thomas Pedersen <[email protected]>
---

Hi Emmanuel,

Will you please test this patch?

net/mac80211/mesh_plink.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 81e6126..1f40c4a 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -528,6 +528,9 @@ static void mesh_plink_timer(unsigned long data)
#ifdef CONFIG_PM
void mesh_plink_quiesce(struct sta_info *sta)
{
+ if (!ieee80211_vif_is_mesh(&sta->sdata->vif))
+ return;
+
if (del_timer_sync(&sta->plink_timer))
sta->plink_timer_was_running = true;
}
--
1.7.10.4



2013-02-05 10:00:10

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: stop plink timer only on mesh interfaces

On Mon, 2013-02-04 at 14:12 -0800, Thomas Pedersen wrote:
> Since mesh_plink_quiesce() would unconditionally delete
> the plink timer, and the timer initialization was recently
> moved into the mesh code path, suspending with a non-mesh
> interface now causes a crash. Fix this by only deleting
> the plink timer for mesh interfaces.

Applied, thanks.

johannes


2013-02-05 06:41:15

by Grumbach, Emmanuel

[permalink] [raw]
Subject: RE: [PATCH] mac80211: stop plink timer only on mesh interfaces

> Since mesh_plink_quiesce() would unconditionally delete
> the plink timer, and the timer initialization was recently
> moved into the mesh code path, suspending with a non-mesh
> interface now causes a crash. Fix this by only deleting
> the plink timer for mesh interfaces.
>
> Reported-by: Emmanuel Grumbach <[email protected]>
> Signed-off-by: Thomas Pedersen <[email protected]>
> ---
>
> Hi Emmanuel,
>
> Will you please test this patch?
>
> net/mac80211/mesh_plink.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
> index 81e6126..1f40c4a 100644
> --- a/net/mac80211/mesh_plink.c
> +++ b/net/mac80211/mesh_plink.c
> @@ -528,6 +528,9 @@ static void mesh_plink_timer(unsigned long data)
> #ifdef CONFIG_PM
> void mesh_plink_quiesce(struct sta_info *sta)
> {
> + if (!ieee80211_vif_is_mesh(&sta->sdata->vif))
> + return;
> +
> if (del_timer_sync(&sta->plink_timer))
> sta->plink_timer_was_running = true;
> }
> --
> 1.7.10.4

Tested-by: Emmanuel Grumbach <[email protected]>
---------------------------------------------------------------------
A member of the Intel Corporation group of companies

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.