On Wed, 2014-11-12 at 14:08 +0200, Jukka Rissanen wrote:

> @@ -850,8 +852,10 @@ void __cfg80211_leave(struct cfg80211_registered_device 
> *rdev,
>               break;
>       case NL80211_IFTYPE_P2P_CLIENT:
>       case NL80211_IFTYPE_STATION:
> -             if (rdev->sched_scan_req && dev == rdev->sched_scan_req->dev)
> +             if (sched_scan_req && dev == sched_scan_req->dev) {
> +                     cancel_work_sync(&sched_scan_req->sched_scan_stop_wk);
>                       __cfg80211_stop_sched_scan(rdev, false);
> +             }
>  
>  #ifdef CONFIG_CFG80211_WEXT
>               kfree(wdev->wext.ie);
> @@ -991,6 +995,10 @@ static int cfg80211_netdev_notifier_call(struct 
> notifier_block *nb,
>  
>               if (WARN_ON(rdev->sched_scan_req &&
>                           rdev->sched_scan_req->dev == wdev->netdev)) {
> +                     struct cfg80211_sched_scan_request *sched_scan_req =
> +                             rdev->sched_scan_req;
> +
> +                     cancel_work_sync(&sched_scan_req->sched_scan_stop_wk);
>                       __cfg80211_stop_sched_scan(rdev, false);
>               }
>  

This can cause deadlocks as it's done with the RTNL held, yet the work
acquires the RTNL.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to