From: Johannes Berg <johannes@sipsolutions.net>
To: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v3 2/2] nl80211: Stop scheduled scan if netlink client disappears
Date: Wed, 12 Nov 2014 13:15:52 +0100 [thread overview]
Message-ID: <1415794552.1798.2.camel@sipsolutions.net> (raw)
In-Reply-To: <1415794139-7124-3-git-send-email-jukka.rissanen@linux.intel.com> (sfid-20141112_130909_519151_DCCF3FB0)
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
prev parent reply other threads:[~2014-11-12 12:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-12 12:08 [PATCH v3 0/2] Stop scheduled scan if netlink client disappears Jukka Rissanen
2014-11-12 12:08 ` [PATCH v3 1/2] nl80211: Replace interface socket owner attribute with more generic one Jukka Rissanen
2014-11-12 12:08 ` [PATCH v3 2/2] nl80211: Stop scheduled scan if netlink client disappears Jukka Rissanen
2014-11-12 12:15 ` Johannes Berg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415794552.1798.2.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=jukka.rissanen@linux.intel.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.