Linux wireless drivers development
 help / color / mirror / Atom feed
From: <Sujith.Manoharan@atheros.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "linville@tuxdriver.com" <linville@tuxdriver.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 1/5] ath9k_htc: Lock sta_notify() callback
Date: Tue, 11 May 2010 16:47:59 +0530	[thread overview]
Message-ID: <19433.15591.251225.477469@gargle.gargle.HOWL> (raw)
In-Reply-To: <1273575453.3669.55.camel@jlt3.sipsolutions.net>

Johannes Berg wrote:
> On Tue, 2010-05-11 at 16:24 +0530, Sujith.Manoharan@atheros.com wrote:
> > Since ->sta_notify() can sleep, protect
> > the callback with a mutex.
> 
> While this may be a correct change, it's not a correct description :)
> 
> You should be locking _data_, not _code_, and due to mac80211 the
> callback cannot be invoked twice at the same time anyway.

It protects all the binary data between lock and unlock. :-)

I encountered a problem with sta_notify() with a script doing
a load/scan/connect/unload cycle and NetworkManager also running,
doing its own scan/connect processing. And at some point,
ath9k_htc_remove_station() failed. Which led me to suspect overlapping
calls to sta_notify().

I do see sta_mtx being taken at all the places where sta_remove() is called
in mac80211, so am not sure how I managed to hit it.

Sujith

      reply	other threads:[~2010-05-11 11:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-11 10:54 [PATCH 1/5] ath9k_htc: Lock sta_notify() callback Sujith.Manoharan
2010-05-11 10:57 ` Johannes Berg
2010-05-11 11:17   ` Sujith.Manoharan [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=19433.15591.251225.477469@gargle.gargle.HOWL \
    --to=sujith.manoharan@atheros.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox