All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: John Linville <linville@tuxdriver.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Stanislaw Gruszka <sgruszka@redhat.com>
Subject: Re: [PATCH] mac80211: fix sw scan locking
Date: Thu, 07 Oct 2010 10:22:20 -0700	[thread overview]
Message-ID: <4CAE01CC.40204@candelatech.com> (raw)
In-Reply-To: <1286448924.3657.35.camel@jlt3.sipsolutions.net>

On 10/07/2010 03:55 AM, Johannes Berg wrote:
> From: Johannes Berg<johannes.berg@intel.com>
>
> The recent scan overhaul broke locking
> because now we can jump to code that
> attempts to unlock, while we don't have
> the mutex held. Fix this by holding the
> mutex around all the relevant code.
>
> Reported-by: Ben Greear<greearb@candelatech.com>
> Signed-off-by: Johannes Berg<johannes.berg@intel.com>

That does indeed fix the problem for me.

Thanks,
Ben

> ---
>   net/mac80211/scan.c |    3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> --- wireless-testing.orig/net/mac80211/scan.c	2010-10-07 10:50:51.000000000 +0200
> +++ wireless-testing/net/mac80211/scan.c	2010-10-07 10:51:10.000000000 +0200
> @@ -682,8 +682,6 @@ void ieee80211_scan_work(struct work_str
>   		goto out_complete;
>   	}
>
> -	mutex_unlock(&local->mtx);
> -
>   	/*
>   	 * as long as no delay is required advance immediately
>   	 * without scheduling a new work
> @@ -714,6 +712,7 @@ void ieee80211_scan_work(struct work_str
>   	} while (next_delay == 0);
>
>   	ieee80211_queue_delayed_work(&local->hw,&local->scan_work, next_delay);
> +	mutex_unlock(&local->mtx);
>   	return;
>
>   out_complete:
>


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


      reply	other threads:[~2010-10-07 17:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07 10:55 [PATCH] mac80211: fix sw scan locking Johannes Berg
2010-10-07 17:22 ` Ben Greear [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=4CAE01CC.40204@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=sgruszka@redhat.com \
    /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.