From: Bob Copeland <me@bobcopeland.com>
To: Thomas Pedersen <thomas@cozybit.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, jirislaby@gmail.com,
mickflemm@gmail.com, lrodriguez@atheros.com,
Javier Cardona <javier@cozybit.com>
Subject: Re: [PATCH] ath5k: Invoke irqsafe version of ieee80211_tx_status() to avoid deadlock
Date: Tue, 30 Aug 2011 07:50:22 -0400 [thread overview]
Message-ID: <20110830115022.GA22125@hash.lan> (raw)
In-Reply-To: <CAG6hwVMYaxsY6XcwbU9_nNMCEO0pC_RiQU-QJBPbpdxO9g4rnA@mail.gmail.com>
On Mon, Aug 29, 2011 at 11:13:10AM -0700, Thomas Pedersen wrote:
> I meant to say "In addition to the above discussion,
> ieee80211_tx_status() should not be called from interrupt context
> anyway".
>
> > the very change the patch added. It's running in a bottom half
> > though, not a hard irq.
>
> Even in a bottom half we're still in "interrupt" context, right?
Yes, but my interpretation is that _irqsafe() in this case refers to
hard irq context and not softirq context. So it's still atomic,
but tx_status() does things like kfree_skb() directly instead of
deferring that to another softirq.
There are 3 contexts in Linux: process, softirq, and hardirq, and
given that we have 3 corresponding tx_status functions (tx_status_ni,
tx_status, tx_status_irqsafe), this interpretation makes sense, no?
Someone correct me if I'm wrong here.
It seems to me this patch warrants some discussion or some comments
in the .h files about how drivers can be called back into themselves;
otherwise it's very hard for a driver writer to get locking right
without examining the stack.
And dropping locks around various API calls means you have to validate
the protected state when you get the lock back, it's not a panacea.
--
Bob Copeland %% www.bobcopeland.com
next prev parent reply other threads:[~2011-08-30 11:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-25 1:34 [PATCH] ath5k: Invoke irqsafe version of ieee80211_tx_status() to avoid deadlock Thomas Pedersen
2011-08-25 9:48 ` Bob Copeland
2011-08-26 14:22 ` John W. Linville
2011-08-29 2:07 ` Thomas Pedersen
2011-08-29 14:09 ` Bob Copeland
2011-08-29 18:13 ` Thomas Pedersen
2011-08-30 11:50 ` Bob Copeland [this message]
2011-08-30 12:18 ` Johannes Berg
2011-08-30 12:21 ` Johannes Berg
2011-08-30 16:22 ` Javier Cardona
2011-08-30 18:29 ` [PATCH] mac80211: Defer tranmission of mesh path errors Javier Cardona
2011-08-30 18:43 ` Johannes Berg
2011-08-30 21:38 ` Javier Cardona
2011-08-31 1:50 ` Javier Cardona
2011-08-31 5:11 ` Johannes Berg
2011-09-01 17:04 ` Javier Cardona
2011-09-01 17:04 ` [PATCH v2] " Javier Cardona
2011-09-02 10:59 ` Johannes Berg
2011-09-06 19:10 ` [PATCH v3] " Javier Cardona
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=20110830115022.GA22125@hash.lan \
--to=me@bobcopeland.com \
--cc=javier@cozybit.com \
--cc=jirislaby@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.com \
--cc=mickflemm@gmail.com \
--cc=thomas@cozybit.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;
as well as URLs for NNTP newsgroup(s).