All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] nl80211: Stop scheduled scan if netlink client disappears
Date: Tue, 11 Nov 2014 15:56:46 +0100	[thread overview]
Message-ID: <1415717806.2163.8.camel@sipsolutions.net> (raw)
In-Reply-To: <1415716059-608-1-git-send-email-jukka.rissanen@linux.intel.com> (sfid-20141111_152746_888050_18874AA2)

On Tue, 2014-11-11 at 16:27 +0200, Jukka Rissanen wrote:

> +static void nl80211_sched_scan_stop_wk(struct work_struct *work)
> +{
> +	struct cfg80211_sched_scan_request *req;
> +	struct cfg80211_registered_device *rdev;
> +
> +	req = container_of(work, struct cfg80211_sched_scan_request,
> +			   sched_scan_stop_wk);
> +
> +	rdev = wiphy_to_rdev(req->wiphy);
> +
> +	rtnl_lock();
> +	__cfg80211_stop_sched_scan(rdev, false);
> +	rtnl_unlock();
> +}

I think you'll need to do something like flush this (which probably
isn't possible due to RTNL usage) when the interface disappears?
Otherwise interface going down and socket closure could race, ifdown
causing the request to be aborted by socket closure having scheduled the
work ... that'd be troubling.

johannes


      parent reply	other threads:[~2014-11-11 14:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 14:27 [PATCH] nl80211: Stop scheduled scan if netlink client disappears Jukka Rissanen
2014-11-11 14:54 ` Johannes Berg
2014-11-11 14:56 ` 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=1415717806.2163.8.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.