On Sat, 7 Oct 2006 11:23:15 +0200, Ivo van Doorn wrote:
> --- a/net/d80211/ieee80211.c
> +++ b/net/d80211/ieee80211.c
> @@ -2075,15 +2075,15 @@ void ieee80211_if_shutdown(struct net_de
>       case IEEE80211_IF_TYPE_STA:
>       case IEEE80211_IF_TYPE_IBSS:
>               sdata->u.sta.state = IEEE80211_DISABLED;
> -             del_timer_sync(&sdata->u.sta.timer);
> +             cancel_delayed_work(&sdata->u.sta.work);
>               if (local->scan_work.data == sdata->dev) {
>                       local->sta_scanning = 0;
>                       cancel_delayed_work(&local->scan_work);
> -                     flush_scheduled_work();
>                       /* see comment in ieee80211_unregister_hw to
>                        * understand why this works */
>                       local->scan_work.data = NULL;
>               }
> +             flush_scheduled_work();

This is racy. local->scan_work.data can be set to NULL only after
flush_scheduled_work().

Other than that, the patch looks good to me.

Thanks,

 Jiri

-- 
Jiri Benc
SUSE Labs
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to