public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Cc: kvalo@codeaurora.org
Subject: Re: [PATCH 4/4] ath9k: fix race condition in enabling/disabling IRQs
Date: Fri, 27 Jan 2017 13:47:06 +0100	[thread overview]
Message-ID: <ca32601f-81f1-aec0-9ab4-02631b226900@nbd.name> (raw)
In-Reply-To: <20170125163654.66431-4-nbd@nbd.name>

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.

- Felix

  reply	other threads:[~2017-01-27 13:11 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 [this message]
2017-02-02  9:10     ` Kalle Valo

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=ca32601f-81f1-aec0-9ab4-02631b226900@nbd.name \
    --to=nbd@nbd.name \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /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