From: Kalle Valo <kvalo@qca.qualcomm.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH] ath10k: serialize CE completions properly
Date: Tue, 14 May 2013 07:29:38 +0300 [thread overview]
Message-ID: <87a9nytc99.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1368189803-14177-1-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Fri, 10 May 2013 14:43:23 +0200")
Michal Kazior <michal.kazior@tieto.com> writes:
> This fixes memory leak when doing heavy TX.
>
> ath10k_pci_check_process_ce() was checking
> `compl_processing` and would call
> ath10k_pci_process_ce() if its false. The
> ath10k_pci_process_ce() would then set it to true
> if there's at least one completion. The lock
> protecting the variable is not held between
> checking and setting the variable, meaning it is a
> possible race condition.
>
> If we then assume ath10k_pci_process_ce() is
> called simultaneusly from different contexts we
> have a race. And apparently this was possible:
>
> ath10k_pci_check_process_ce() was called from
> ath10k_ce_per_engine_service(). This in turn could
> be called either from multiple tasklets (MSI-X) or
> a tasklet (MSI, Legacy INTR) or
> ath10k_htc_send_complete_check().
>
> The race itself would cause corruption of
> htt.refcount (ath10k_skb_cb) and we'd leak
> multiple skbuffs per tx.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Thanks, applied.
--
Kalle Valo
prev parent reply other threads:[~2013-05-14 4:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87haie3mlw.fsf_-_@kamboji.qca.qualcomm.com>
2013-05-08 10:00 ` [ath9k-devel] [RFT] ath10k: serialize CE completions properly Michal Kazior
2013-05-09 4:07 ` Sujith Manoharan
2013-05-10 12:43 ` [ath9k-devel] [PATCH] " Michal Kazior
2013-05-14 4:29 ` 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=87a9nytc99.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath9k-devel@lists.ath9k.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