linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Kazior <michal.kazior@tieto.com>
To: ath10k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org, Michal Kazior <michal.kazior@tieto.com>
Subject: [PATCH v2 2/2] ath10k: prevent hif_stop being called twice
Date: Thu, 15 May 2014 08:48:41 +0200	[thread overview]
Message-ID: <1400136521-11184-3-git-send-email-michal.kazior@tieto.com> (raw)
In-Reply-To: <1400136521-11184-1-git-send-email-michal.kazior@tieto.com>

Recently there was a bug discovered that involved
hif_stop() being called twice that ended up with a
double free_irq() call but it only manifested with
multiple MSI interrupts mapping.

Catch this kind of a problem early in driver
regardless of interrupt mapping.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/pci.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 3d0cd75..70e91ac 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -1272,6 +1272,9 @@ static void ath10k_pci_hif_stop(struct ath10k *ar)
 
 	ath10k_dbg(ATH10K_DBG_BOOT, "boot hif stop\n");
 
+	if (WARN_ON(!ar_pci->started))
+		return;
+
 	ret = ath10k_ce_disable_interrupts(ar);
 	if (ret)
 		ath10k_warn("failed to disable CE interrupts: %d\n", ret);
-- 
1.8.5.3


  parent reply	other threads:[~2014-05-15  6:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 12:16 [PATCH 0/2] ath10k: fixes 2014-05-14 Michal Kazior
2014-05-14 12:16 ` [PATCH 1/2] ath10k: fix core start sequence Michal Kazior
2014-05-14 12:16 ` [PATCH 2/2] ath10k: prevent hif_stop being called twice Michal Kazior
2014-05-14 14:26 ` [PATCH 0/2] ath10k: fixes 2014-05-14 Kalle Valo
2014-05-15  6:48 ` [PATCH v2 " Michal Kazior
2014-05-15  6:48   ` [PATCH v2 1/2] ath10k: fix core start sequence Michal Kazior
2014-05-15  6:48   ` Michal Kazior [this message]
2014-05-23  8:01   ` [PATCH v2 0/2] ath10k: fixes 2014-05-14 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=1400136521-11184-3-git-send-email-michal.kazior@tieto.com \
    --to=michal.kazior@tieto.com \
    --cc=ath10k@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).