linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] mac80211:  Don't restart sta-timer if not associated.
@ 2013-03-20  0:50 greearb
  2013-03-20  7:30 ` Stanislaw Gruszka
  0 siblings, 1 reply; 3+ messages in thread
From: greearb @ 2013-03-20  0:50 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ben Greear

From: Ben Greear <greearb@candelatech.com>

I found another crash when deleting lots of virtual stations
in a congested environment.  I think the problem is that
the ieee80211_mlme_notify_scan_completed could call
ieee80211_restart_sta_timer for a stopped interface
that was about to be deleted.

With the following patch I am unable to reproduce the
crash.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
v3:  Just check for sdata-is-running once at top of method
  instead of worrying about if it is associated or not.

:100644 100644 aec786d... 74a8c5f... M	net/mac80211/mlme.c
 net/mac80211/mlme.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index aec786d..74a8c5f 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2933,6 +2933,9 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
 {
 	u32 flags;
 
+	if (!ieee80211_sdata_running(sdata))
+		return;
+
 	if (sdata->vif.type == NL80211_IFTYPE_STATION) {
 		__ieee80211_stop_poll(sdata);
 
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] mac80211:  Don't restart sta-timer if not associated.
  2013-03-20  0:50 [PATCH v3] mac80211: Don't restart sta-timer if not associated greearb
@ 2013-03-20  7:30 ` Stanislaw Gruszka
  2013-03-22  9:56   ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Stanislaw Gruszka @ 2013-03-20  7:30 UTC (permalink / raw)
  To: greearb; +Cc: linux-wireless

On Tue, Mar 19, 2013 at 05:50:50PM -0700, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
> 
> I found another crash when deleting lots of virtual stations
> in a congested environment.  I think the problem is that
> the ieee80211_mlme_notify_scan_completed could call
> ieee80211_restart_sta_timer for a stopped interface
> that was about to be deleted.
> 
> With the following patch I am unable to reproduce the
> crash.
> 
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
> v3:  Just check for sdata-is-running once at top of method
>   instead of worrying about if it is associated or not.
> 
> :100644 100644 aec786d... 74a8c5f... M	net/mac80211/mlme.c
>  net/mac80211/mlme.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index aec786d..74a8c5f 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -2933,6 +2933,9 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
>  {
>  	u32 flags;
>  
> +	if (!ieee80211_sdata_running(sdata))
> +		return;
> +

I think this check should go to ieee80211_mlme_notify_scan_completed(),
and another one to ieee80211_mesh_notify_scan_completed(), IBSS already
has it.

Stanislaw

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] mac80211:  Don't restart sta-timer if not associated.
  2013-03-20  7:30 ` Stanislaw Gruszka
@ 2013-03-22  9:56   ` Johannes Berg
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2013-03-22  9:56 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: greearb, linux-wireless

On Wed, 2013-03-20 at 08:30 +0100, Stanislaw Gruszka wrote:
> On Tue, Mar 19, 2013 at 05:50:50PM -0700, greearb@candelatech.com wrote:
> > From: Ben Greear <greearb@candelatech.com>
> > 
> > I found another crash when deleting lots of virtual stations
> > in a congested environment.  I think the problem is that
> > the ieee80211_mlme_notify_scan_completed could call
> > ieee80211_restart_sta_timer for a stopped interface
> > that was about to be deleted.
> > 
> > With the following patch I am unable to reproduce the
> > crash.
> > 
> > Signed-off-by: Ben Greear <greearb@candelatech.com>
> > ---
> > v3:  Just check for sdata-is-running once at top of method
> >   instead of worrying about if it is associated or not.
> > 
> > :100644 100644 aec786d... 74a8c5f... M	net/mac80211/mlme.c
> >  net/mac80211/mlme.c |    3 +++
> >  1 files changed, 3 insertions(+), 0 deletions(-)
> > 
> > diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> > index aec786d..74a8c5f 100644
> > --- a/net/mac80211/mlme.c
> > +++ b/net/mac80211/mlme.c
> > @@ -2933,6 +2933,9 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
> >  {
> >  	u32 flags;
> >  
> > +	if (!ieee80211_sdata_running(sdata))
> > +		return;
> > +
> 
> I think this check should go to ieee80211_mlme_notify_scan_completed(),
> and another one to ieee80211_mesh_notify_scan_completed(), IBSS already
> has it.

I made these changes and applied it.

johannes


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-22  9:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-20  0:50 [PATCH v3] mac80211: Don't restart sta-timer if not associated greearb
2013-03-20  7:30 ` Stanislaw Gruszka
2013-03-22  9:56   ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).