public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Felix Fietkau <nbd@nbd.name>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 4/4] ath9k: fix race condition in enabling/disabling IRQs
Date: Thu, 02 Feb 2017 11:10:34 +0200	[thread overview]
Message-ID: <871svhez5h.fsf@purkki.adurom.net> (raw)
In-Reply-To: <ca32601f-81f1-aec0-9ab4-02631b226900@nbd.name> (Felix Fietkau's message of "Fri, 27 Jan 2017 13:47:06 +0100")

Felix Fietkau <nbd@nbd.name> writes:

> On 2017-01-25 17:36, Felix Fietkau wrote:
>> The code currently relies on refcounting to disable IRQs from within the
>> IRQ handler and re-enabling them again after the tasklet has run.
>> 
>> However, due to race conditions sometimes the IRQ handler might be
>> called twice, or the tasklet may not run at all (if interrupted in the
>> middle of a reset).
>> 
>> This can cause nasty imbalances in the irq-disable refcount which will
>> get the driver permanently stuck until the entire radio has been stopped
>> and started again (ath_reset will not recover from this).
>> 
>> Instead of using this fragile logic, change the code to ensure that
>> running the irq handler during tasklet processing is safe, and leave the
>> refcount untouched.
>> 
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Felix Fietkau <nbd@nbd.name>
>
> Please don't apply this yet, it looks like it might cause some
> regressions on other devices. I will investigate.

Ok, as patch 3 also had some changes I'll drop these now. So please
resend the whole patch series once you know more.

-- 
Kalle Valo

      reply	other threads:[~2017-02-02  9:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 16:36 [PATCH 1/4] ath9k: rename tx_complete_work to hw_check_work Felix Fietkau
2017-01-25 16:36 ` [PATCH 2/4] ath9k_hw: check if the chip failed to wake up Felix Fietkau
2017-01-25 16:36 ` [PATCH 3/4] ath9k: check for deaf rx path state Felix Fietkau
2017-01-26  9:50   ` Simon Wunderlich
2017-01-26 10:02     ` Felix Fietkau
2017-01-26 10:15       ` Simon Wunderlich
2017-01-26 10:26         ` Felix Fietkau
2017-01-26 10:32           ` Simon Wunderlich
2017-01-25 16:36 ` [PATCH 4/4] ath9k: fix race condition in enabling/disabling IRQs Felix Fietkau
2017-01-27 12:47   ` Felix Fietkau
2017-02-02  9:10     ` Kalle Valo [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=871svhez5h.fsf@purkki.adurom.net \
    --to=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    /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