All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Pedersen <thomas@cozybit.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, jirislaby@gmail.com,
	mickflemm@gmail.com, lrodriguez@atheros.com, me@bobcopeland.com,
	Javier Cardona <javier@cozybit.com>
Subject: Re: [PATCH] ath5k: Invoke irqsafe version of ieee80211_tx_status() to avoid deadlock
Date: Sun, 28 Aug 2011 19:07:42 -0700	[thread overview]
Message-ID: <CAG6hwVM8t=v0_xZuKf-nodZR77R0S8nSUgea9QM5S-vB4h_8jg@mail.gmail.com> (raw)
In-Reply-To: <20110826142210.GE2579@tuxdriver.com>

On Fri, Aug 26, 2011 at 7:22 AM, John W. Linville
<linville@tuxdriver.com> wrote:
> On Wed, Aug 24, 2011 at 06:34:24PM -0700, Thomas Pedersen wrote:
>> From: Javier Cardona <javier@cozybit.com>
>>
>> This driver reports transmission status to the upper layer
>> (ath5k_tx_frame_completed()) while holding the lock on the transmission
>> queue (txq->lock).  Under failure conditions, the mesh stack will
>> attempt to send PERR messages to the previous sender of the failed
>> frame.  When that happens the driver will attempt to re-acquire the
>> txq->lock lock causing a deadlock.  There are two possible fixes for
>> this, (1) we could defer the transmission of the PERR frame until the
>> lock is released or (2) release the lock before invoking
>> ieee80211_tx_status().  The ath9k driver implements the second approach
>> (see ath_tx_complete() in ath9k/xmit.c) as well as the rt2x00 and b43
>> drivers.  The iwl driver, on the other hand, avoids this problem by
>> invoking  ieee80211_tx_status_irqsafe() which effectively defers
>> processing of transmission feedback status.  This last approach is the
>> least intrusive is implemented here.
>>
>> Reported by Pedro Larbig (ASPj)
>> ---
>>  drivers/net/wireless/ath/ath5k/base.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> Missing Signed-off-by...
>
Yikes. Also, it looks like ieee80211_tx_status() should not be called
from irq context. Will resubmit a v2 with signoff and comment shortly.

Thomas

  reply	other threads:[~2011-08-29  2:07 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 [this message]
2011-08-29 14:09     ` Bob Copeland
2011-08-29 18:13       ` Thomas Pedersen
2011-08-30 11:50         ` Bob Copeland
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='CAG6hwVM8t=v0_xZuKf-nodZR77R0S8nSUgea9QM5S-vB4h_8jg@mail.gmail.com' \
    --to=thomas@cozybit.com \
    --cc=javier@cozybit.com \
    --cc=jirislaby@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=lrodriguez@atheros.com \
    --cc=me@bobcopeland.com \
    --cc=mickflemm@gmail.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.