From: Johannes Berg <johannes@sipsolutions.net>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>,
"John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com
Subject: Re: [rt2x00-users] [PATCH 3.3 v2] rt2x00: fix random stalls
Date: Fri, 09 Mar 2012 09:33:07 +0100 [thread overview]
Message-ID: <1331281987.3491.0.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <20120309082216.GA2339@redhat.com> (sfid-20120309_092236_584600_4D716D27)
On Fri, 2012-03-09 at 09:22 +0100, Stanislaw Gruszka wrote:
> > > + spin_lock(&queue->tx_lock);
> > > rt2x00queue_pause_queue(queue);
> > > + spin_unlock(&queue->tx_lock);
> > > exit_free_skb:
> > > ieee80211_free_txskb(hw, skb);
> > > }
> >
> > I'm sorry, but I'm still not convinced that we can use spin_lock_bh in
> > one place of the code and then spin_lock in another place of the code,
> > using the *same* spinlock.
> > I always use the cheat sheet shown in:
> > http://www.kernel.org/pub/linux/kernel/people/rusty/kernel-locking/c214.html
> >
> > which to me shows that by definition we should be using spin_lock_bh in
> > all cases now, the new ones and the existing cases where we lock tx_lock.
>
> We have bh disabled here since ieee80211_xmit is always called with bh
> disabled (early on dev_queue_xmit() or in ieee80211_tx_skb_tid()). I can
> add comment about that.
And in fact if you were to use spin_unlock_bh() in that kind of context
it would be a bug :-)
johannes
next prev parent reply other threads:[~2012-03-09 8:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-07 18:31 [PATCH 3.3 v2] rt2x00: fix random stalls Stanislaw Gruszka
2012-03-08 21:40 ` [rt2x00-users] " Gertjan van Wingerde
2012-03-09 8:22 ` Stanislaw Gruszka
2012-03-09 8:33 ` Johannes Berg [this message]
2012-03-09 9:46 ` Gertjan van Wingerde
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=1331281987.3491.0.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=gwingerde@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=sgruszka@redhat.com \
--cc=users@rt2x00.serialmonkey.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).